allow modular built of ide-pnp
PATCH 1/1 allow modular built of ide-pnp
From: Christoph Hellwig <[email protected]>
patch is based on previous work of Herbert Xu
and included in current debian kernel images.
allows modular ide-pnp
Signed-off-by maximilian attems <[email protected]>
drivers/ide/Kconfig +1 -1
@@ -315,7 +315,7 @@ Otherwise say N. config BLK_DEV_IDEPNP - bool "PNP EIDE support" + tristate "PNP EIDE support" depends on PNP help If you have a PnP (Plug and Play) compatible EIDE card and
drivers/ide/Makefile +1 -1
@@ -22,7 +22,6 @@ ide-core-$(CONFIG_BLK_DEV_IDEDMA) += ide-dma.o ide-core-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o ide-core-$(CONFIG_PROC_FS) += ide-proc.o -ide-core-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o # built-in only drivers from arm/ ide-core-$(CONFIG_IDE_ARM) += arm/ide_arm.o
@@ -43,6 +42,7 @@ obj-$(CONFIG_BLK_DEV_IDE) += ide-core.o obj-$(CONFIG_IDE_GENERIC) += ide-generic.o +obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
drivers/ide/ide-pnp.c +16 -2
@@ -69,7 +69,21 @@ .remove = idepnp_remove, }; -void __init pnpide_init (void ) +int __init pnpide_init (void ) { -pnp_register_driver (&idepnp_driver); +return pnp_register_driver (&idepnp_driver); } + +#ifdef MODULE +static void __exit pnpide_exit(void) +{ +pnp_unregister_driver (&idepnp_driver); +} + +module_init (pnpide_init); +module_exit (pnpide_exit); +#endif + +MODULE_AUTHOR ("Andrey Panin" ); +MODULE_DESCRIPTION ("Enabler for ISAPNP IDE devices" ); +MODULE_LICENSE ("GPL" );
drivers/ide/ide.c +1 -1
@@ -1789,7 +1789,7 @@return 1 ; } -extern void pnpide_init (void ); +extern int pnpide_init (void );extern void h8300_ide_init (void );/*