Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07c015e7 authored by tonyj@suse.de's avatar tonyj@suse.de Committed by Greg Kroah-Hartman
Browse files

Convert from class_device to device in drivers/char



Convert from class_device to device in drivers/char.

Signed-off-by: default avatarTony Jones <tonyj@suse.de>
Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 60043428
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -513,7 +513,7 @@ static int __init dsp56k_init_driver(void)
		err = PTR_ERR(dsp56k_class);
		err = PTR_ERR(dsp56k_class);
		goto out_chrdev;
		goto out_chrdev;
	}
	}
	class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k");
	device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), "dsp56k");


	printk(banner);
	printk(banner);
	goto out;
	goto out;
@@ -527,7 +527,7 @@ module_init(dsp56k_init_driver);


static void __exit dsp56k_cleanup_driver(void)
static void __exit dsp56k_cleanup_driver(void)
{
{
	class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0));
	device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0));
	class_destroy(dsp56k_class);
	class_destroy(dsp56k_class);
	unregister_chrdev(DSP56K_MAJOR, "dsp56k");
	unregister_chrdev(DSP56K_MAJOR, "dsp56k");
}
}
+6 −6
Original line number Original line Diff line number Diff line
@@ -411,8 +411,8 @@ cleanup_module(void)
			iiResetDelay( i2BoardPtrTable[i] );
			iiResetDelay( i2BoardPtrTable[i] );
			/* free io addresses and Tibet */
			/* free io addresses and Tibet */
			release_region( ip2config.addr[i], 8 );
			release_region( ip2config.addr[i], 8 );
			class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i));
			device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i));
			class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1));
			device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1));
		}
		}
		/* Disable and remove interrupt handler. */
		/* Disable and remove interrupt handler. */
		if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) {	
		if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) {	
@@ -718,12 +718,12 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
			}
			}


			if ( NULL != ( pB = i2BoardPtrTable[i] ) ) {
			if ( NULL != ( pB = i2BoardPtrTable[i] ) ) {
				class_device_create(ip2_class, NULL,
				device_create(ip2_class, NULL,
						MKDEV(IP2_IPL_MAJOR, 4 * i),
						MKDEV(IP2_IPL_MAJOR, 4 * i),
						NULL, "ipl%d", i);
						"ipl%d", i);
				class_device_create(ip2_class, NULL,
				device_create(ip2_class, NULL,
						MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
						MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
						NULL, "stat%d", i);
						"stat%d", i);


			    for ( box = 0; box < ABS_MAX_BOXES; ++box )
			    for ( box = 0; box < ABS_MAX_BOXES; ++box )
			    {
			    {
+3 −3
Original line number Original line Diff line number Diff line
@@ -865,7 +865,7 @@ static void ipmi_new_smi(int if_num, struct device *device)
	entry->dev = dev;
	entry->dev = dev;


	mutex_lock(&reg_list_mutex);
	mutex_lock(&reg_list_mutex);
	class_device_create(ipmi_class, NULL, dev, device, "ipmi%d", if_num);
	device_create(ipmi_class, device, dev, "ipmi%d", if_num);
	list_add(&entry->link, &reg_list);
	list_add(&entry->link, &reg_list);
	mutex_unlock(&reg_list_mutex);
	mutex_unlock(&reg_list_mutex);
}
}
@@ -883,7 +883,7 @@ static void ipmi_smi_gone(int if_num)
			break;
			break;
		}
		}
	}
	}
	class_device_destroy(ipmi_class, dev);
	device_destroy(ipmi_class, dev);
	mutex_unlock(&reg_list_mutex);
	mutex_unlock(&reg_list_mutex);
}
}


@@ -938,7 +938,7 @@ static __exit void cleanup_ipmi(void)
	mutex_lock(&reg_list_mutex);
	mutex_lock(&reg_list_mutex);
	list_for_each_entry_safe(entry, entry2, &reg_list, link) {
	list_for_each_entry_safe(entry, entry2, &reg_list, link) {
		list_del(&entry->link);
		list_del(&entry->link);
		class_device_destroy(ipmi_class, entry->dev);
		device_destroy(ipmi_class, entry->dev);
		kfree(entry);
		kfree(entry);
	}
	}
	mutex_unlock(&reg_list_mutex);
	mutex_unlock(&reg_list_mutex);
+3 −5
Original line number Original line Diff line number Diff line
@@ -4624,9 +4624,8 @@ static int __init istallion_module_init(void)


	istallion_class = class_create(THIS_MODULE, "staliomem");
	istallion_class = class_create(THIS_MODULE, "staliomem");
	for (i = 0; i < 4; i++)
	for (i = 0; i < 4; i++)
		class_device_create(istallion_class, NULL,
		device_create(istallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i),
				MKDEV(STL_SIOMEMMAJOR, i),
			      "staliomem%d", i);
				NULL, "staliomem%d", i);


	return 0;
	return 0;
err_deinit:
err_deinit:
@@ -4659,8 +4658,7 @@ static void __exit istallion_module_exit(void)
	unregister_chrdev(STL_SIOMEMMAJOR, "staliomem");
	unregister_chrdev(STL_SIOMEMMAJOR, "staliomem");


	for (j = 0; j < 4; j++)
	for (j = 0; j < 4; j++)
		class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR,
		device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, j));
					j));
	class_destroy(istallion_class);
	class_destroy(istallion_class);


	pci_unregister_driver(&stli_pcidriver);
	pci_unregister_driver(&stli_pcidriver);
+2 −3
Original line number Original line Diff line number Diff line
@@ -799,8 +799,7 @@ static int lp_register(int nr, struct parport *port)
	if (reset)
	if (reset)
		lp_reset(nr);
		lp_reset(nr);


	class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), port->dev,
	device_create(lp_class, port->dev, MKDEV(LP_MAJOR, nr), "lp%d", nr);
				"lp%d", nr);


	printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, 
	printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, 
	       (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
	       (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
@@ -971,7 +970,7 @@ static void lp_cleanup_module (void)
		if (lp_table[offset].dev == NULL)
		if (lp_table[offset].dev == NULL)
			continue;
			continue;
		parport_unregister_device(lp_table[offset].dev);
		parport_unregister_device(lp_table[offset].dev);
		class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset));
		device_destroy(lp_class, MKDEV(LP_MAJOR, offset));
	}
	}
	class_destroy(lp_class);
	class_destroy(lp_class);
}
}
Loading