On Sat, 12 Feb 2005, Noah Misch wrote:

On Sat, Feb 12, 2005 at 09:49:57PM +1100, Finn Thain wrote:
--- linux-2.6.10/drivers/scsi/scsi_module.c     2004-12-25
08:34:29.000000000 +1100
+++ /Volumes/Linux/btc/build/linux-2.6.10/drivers/scsi/scsi_module.c
2005-02-13 20:45:33.677591385 +1100
@@ -21,12 +21,14 @@
        struct list_head *l;
        int error;

+#if defined(MODULE) || defined(CONFIG_HOTPLUG)

An __exit function calls sht->release, so #ifdef MODULE is sufficient.

I don't agree. MODULE is insufficient because when CONFIG_HOTPLUG is undefined and this driver is built into the kernel, it will not load. This is because the release method will be NULL, because your patch assigns .release = __devexit_p(macscsi_release).


I expect that this problem will/has already come up in the context of certain other NCR5380 drivers. dtc.c, t128.c and pas16.c all declare static release methods, and g_NCR5380.c declares it the same as did mac_scsi.c prior to your patch. They will surely have the same problems linking that mac_scsi.c suffered before your patch, and the same problem loading after your patch -- unless, they are compiled as modules or CONFIG_HOTPLUG is defined.

BTW, Atari and Sun 3 don't have this problem because each has its own variant of NCR5380.c that doesn't use __devexit.

-f

        if (!sht->release) {
                printk(KERN_ERR
                    "scsi HBA driver %s didn't set a release method.\n",
                    sht->name);
                return -EINVAL;
        }
+#endif
_______________________________________________
linux-mac68k mailing list
[EMAIL PROTECTED]
http://lists.purplehat.net/listinfo/linux-mac68k

-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to