Convert from class_device to device in drivers/char
Convert from class_device to device in drivers/char. Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Родитель
60043428a5
Коммит
07c015e765
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -865,7 +865,7 @@ static void ipmi_new_smi(int if_num, struct device *device)
|
||||||
entry->dev = dev;
|
entry->dev = dev;
|
||||||
|
|
||||||
mutex_lock(®_list_mutex);
|
mutex_lock(®_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, ®_list);
|
list_add(&entry->link, ®_list);
|
||||||
mutex_unlock(®_list_mutex);
|
mutex_unlock(®_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(®_list_mutex);
|
mutex_unlock(®_list_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -938,7 +938,7 @@ static __exit void cleanup_ipmi(void)
|
||||||
mutex_lock(®_list_mutex);
|
mutex_lock(®_list_mutex);
|
||||||
list_for_each_entry_safe(entry, entry2, ®_list, link) {
|
list_for_each_entry_safe(entry, entry2, ®_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(®_list_mutex);
|
mutex_unlock(®_list_mutex);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1863,8 +1863,7 @@ static int cm4000_probe(struct pcmcia_device *link)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
class_device_create(cmm_class, NULL, MKDEV(major, i), NULL,
|
device_create(cmm_class, NULL, MKDEV(major, i), "cmm%d", i);
|
||||||
"cmm%d", i);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1888,7 +1887,7 @@ static void cm4000_detach(struct pcmcia_device *link)
|
||||||
dev_table[devno] = NULL;
|
dev_table[devno] = NULL;
|
||||||
kfree(dev);
|
kfree(dev);
|
||||||
|
|
||||||
class_device_destroy(cmm_class, MKDEV(major, devno));
|
device_destroy(cmm_class, MKDEV(major, devno));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -642,8 +642,7 @@ static int reader_probe(struct pcmcia_device *link)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
class_device_create(cmx_class, NULL, MKDEV(major, i), NULL,
|
device_create(cmx_class, NULL, MKDEV(major, i), "cmx%d", i);
|
||||||
"cmx%d", i);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -666,7 +665,7 @@ static void reader_detach(struct pcmcia_device *link)
|
||||||
dev_table[devno] = NULL;
|
dev_table[devno] = NULL;
|
||||||
kfree(dev);
|
kfree(dev);
|
||||||
|
|
||||||
class_device_destroy(cmx_class, MKDEV(major, devno));
|
device_destroy(cmx_class, MKDEV(major, devno));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -441,8 +441,7 @@ scdrv_init(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
class_device_create(snsc_class, NULL, dev, NULL,
|
device_create(snsc_class, NULL, dev, "%s", devname);
|
||||||
"%s", devname);
|
|
||||||
|
|
||||||
ia64_sn_irtr_intr_enable(scd->scd_nasid,
|
ia64_sn_irtr_intr_enable(scd->scd_nasid,
|
||||||
0 /*ignored */ ,
|
0 /*ignored */ ,
|
||||||
|
|
|
@ -4778,9 +4778,8 @@ static int __init stallion_module_init(void)
|
||||||
if (IS_ERR(stallion_class))
|
if (IS_ERR(stallion_class))
|
||||||
printk("STALLION: failed to create class\n");
|
printk("STALLION: failed to create class\n");
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
class_device_create(stallion_class, NULL,
|
device_create(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i),
|
||||||
MKDEV(STL_SIOMEMMAJOR, i), NULL,
|
"staliomem%d", i);
|
||||||
"staliomem%d", i);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
err_unrtty:
|
err_unrtty:
|
||||||
|
@ -4816,7 +4815,7 @@ static void __exit stallion_module_exit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i));
|
device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i));
|
||||||
unregister_chrdev(STL_SIOMEMMAJOR, "staliomem");
|
unregister_chrdev(STL_SIOMEMMAJOR, "staliomem");
|
||||||
class_destroy(stallion_class);
|
class_destroy(stallion_class);
|
||||||
|
|
||||||
|
|
|
@ -441,8 +441,8 @@ tipar_register(int nr, struct parport *port)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR,
|
device_create(tipar_class, port->dev, MKDEV(TIPAR_MAJOR,
|
||||||
TIPAR_MINOR + nr), port->dev, "par%d", nr);
|
TIPAR_MINOR + nr), "par%d", nr);
|
||||||
|
|
||||||
/* Display informations */
|
/* Display informations */
|
||||||
pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==
|
pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==
|
||||||
|
@ -534,7 +534,7 @@ tipar_cleanup_module(void)
|
||||||
if (table[i].dev == NULL)
|
if (table[i].dev == NULL)
|
||||||
continue;
|
continue;
|
||||||
parport_unregister_device(table[i].dev);
|
parport_unregister_device(table[i].dev);
|
||||||
class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i));
|
device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i));
|
||||||
}
|
}
|
||||||
class_destroy(tipar_class);
|
class_destroy(tipar_class);
|
||||||
|
|
||||||
|
|
|
@ -871,10 +871,10 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
||||||
state[i].cur_part = 0;
|
state[i].cur_part = 0;
|
||||||
for (j = 0; j < MAX_PARTITIONS; ++j)
|
for (j = 0; j < MAX_PARTITIONS; ++j)
|
||||||
state[i].part_stat_rwi[j] = VIOT_IDLE;
|
state[i].part_stat_rwi[j] = VIOT_IDLE;
|
||||||
class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), NULL,
|
device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i),
|
||||||
"iseries!vt%d", i);
|
"iseries!vt%d", i);
|
||||||
class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
|
device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
|
||||||
NULL, "iseries!nvt%d", i);
|
"iseries!nvt%d", i);
|
||||||
printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries "
|
printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries "
|
||||||
"resource %10.10s type %4.4s, model %3.3s\n",
|
"resource %10.10s type %4.4s, model %3.3s\n",
|
||||||
i, viotape_unitinfo[i].rsrcname,
|
i, viotape_unitinfo[i].rsrcname,
|
||||||
|
@ -886,8 +886,8 @@ static int viotape_remove(struct vio_dev *vdev)
|
||||||
{
|
{
|
||||||
int i = vdev->unit_address;
|
int i = vdev->unit_address;
|
||||||
|
|
||||||
class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80));
|
device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80));
|
||||||
class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i));
|
device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче