X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Fstallion.c;h=3beb2203d24be21375175daf23021bbdd8e6daae;hb=20f99dcf417a28089ef6c877ae97f5dec2eab435;hp=00b4a2187164ce408ebac2e3e5b3e7f3ef3291ed;hpb=1903ac54f8536b11478e4f01c339e10b538f59e0;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 00b4a218716..3beb2203d24 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c @@ -26,7 +26,6 @@ /*****************************************************************************/ -#include #include #include #include @@ -40,7 +39,6 @@ #include #include #include -#include #include #include @@ -709,7 +707,7 @@ static unsigned int sc26198_baudtable[] = { * Define the driver info for a user level control device. Used mainly * to get at port stats - only not using the port device itself. */ -static struct file_operations stl_fsiomem = { +static const struct file_operations stl_fsiomem = { .owner = THIS_MODULE, .ioctl = stl_memioctl, }; @@ -757,11 +755,8 @@ static void __exit stallion_module_exit(void) "errno=%d\n", -i); return; } - for (i = 0; i < 4; i++) { - devfs_remove("staliomem/%d", i); + for (i = 0; i < 4; i++) class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i)); - } - devfs_remove("staliomem"); if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) printk("STALLION: failed to un-register serial memory device, " "errno=%d\n", -i); @@ -2307,7 +2302,7 @@ static inline int stl_initeio(stlbrd_t *brdp) brdp->nrpanels = 1; brdp->state |= BRD_FOUND; brdp->hwid = status; - if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { + if (request_irq(brdp->irq, stl_intr, IRQF_SHARED, name, brdp) != 0) { printk("STALLION: failed to register interrupt " "routine for %s irq=%d\n", name, brdp->irq); rc = -ENODEV; @@ -2517,7 +2512,7 @@ static inline int stl_initech(stlbrd_t *brdp) outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl); brdp->state |= BRD_FOUND; - if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { + if (request_irq(brdp->irq, stl_intr, IRQF_SHARED, name, brdp) != 0) { printk("STALLION: failed to register interrupt " "routine for %s irq=%d\n", name, brdp->irq); i = -ENODEV; @@ -3044,22 +3039,16 @@ static int __init stl_init(void) */ if (register_chrdev(STL_SIOMEMMAJOR, "staliomem", &stl_fsiomem)) printk("STALLION: failed to register serial board device\n"); - devfs_mk_dir("staliomem"); stallion_class = class_create(THIS_MODULE, "staliomem"); - for (i = 0; i < 4; i++) { - devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), - S_IFCHR|S_IRUSR|S_IWUSR, - "staliomem/%d", i); + for (i = 0; i < 4; i++) class_device_create(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), NULL, "staliomem%d", i); - } stl_serial->owner = THIS_MODULE; stl_serial->driver_name = stl_drvname; stl_serial->name = "ttyE"; - stl_serial->devfs_name = "tts/E"; stl_serial->major = STL_SERIALMAJOR; stl_serial->minor_start = 0; stl_serial->type = TTY_DRIVER_TYPE_SERIAL;