[PATCH] use core driver name for ATM device

Roman Kagan rkagan at mail.ru
Mon Feb 7 06:29:30 EST 2005

  Hi Duncan,

This one-liner fixes the case when subdriver's module gets unloaded,
thus its .driver_name gets destroyed, while ATM still holds a reference
to it.  It passes instead usbatm_driver_name to ATM.

Alternatively we can make a private copy of subdriver's .driver_name and
release it in usbatm_destroy_instance, but it doesn't seem to be worth
to bother.


--- usbatm.c~	2005-02-07 05:19:40.000000000 +0300
+++ usbatm.c	2005-02-07 14:16:51.223668440 +0300
@@ -969,7 +969,7 @@
 	int ret;
 	/* ATM init */
-	atm_dev = atm_dev_register(instance->driver->driver_name, &usbatm_atm_devops, -1, NULL);
+	atm_dev = atm_dev_register(usbatm_driver_name, &usbatm_atm_devops, -1, NULL);
 	if (!atm_dev) {
 		dbg("usbatm_atm_init: failed to register ATM device!");
 		return -1;

More information about the Usbatm mailing list