On Wed, Nov 08, 2006 at 09:40:10PM +0900, Akinobu Mita wrote:
> This patch adds a flag to serio driver indicating whether registration is
> complete and check that flag in serio_unregister_driver.
> --- work-fault-inject.orig/include/linux/serio.h
> +++ work-fault-inject/include/linux/serio.h
> @@ -68,6 +68,7 @@ struct serio_driver {
> void (*cleanup)(struct serio *);
>
> struct device_driver driver;
> + int registered;
bitfield please.
> --- work-fault-inject.orig/drivers/input/serio/serio.c
> +++ work-fault-inject/drivers/input/serio/serio.c
> @@ -804,6 +804,8 @@ static void serio_add_driver(struct seri
> printk(KERN_ERR
> "serio: driver_register() failed for %s, error: %d\n",
> drv->driver.name, error);
> + else
> + drv->registered = 1;
> }
>
> int __serio_register_driver(struct serio_driver *drv, struct module *owne
> @@ -830,7 +832,10 @@ start_over:
> }
> }
>
> - driver_unregister(&drv->driver);
> + if (drv->registered) {
> + driver_unregister(&drv->driver);
> + drv->registered = 0;
> + }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]