Skip to content

Commit

Permalink
ide-pci-generic: kill the unused ifdef/endif/MODULE code
Browse files Browse the repository at this point in the history
with module_param macro, the __setup code can be killed now:
	const __setup("all-generic-ide", ide_generic_all_on);

and the module name "generic.ko" is not descriptive to its functionality,
can be changed in Makefile, the "ide-pci-generic.ko" is better.

the ide-pci-generic.all-generic-ide parameter also documented
in Documentation/kernel-parameters.txt

Signed-off-by: Denis Cheng <crquan@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Denis Cheng authored and Bartlomiej Zolnierkiewicz committed Feb 6, 2008
1 parent b004223 commit 594765a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
3 changes: 3 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,9 @@ and is between 256 and 4096 characters. It is defined in the file
loop use the MONITOR/MWAIT idle loop anyways. Performance should be the same
as idle=poll.

ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem
Claim all unknown PCI IDE storage controllers.

ignore_loglevel [KNL]
Ignore loglevel setting - this will print /all/
kernel messages to the console. Useful for debugging.
Expand Down
3 changes: 2 additions & 1 deletion drivers/ide/pci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ obj-$(CONFIG_BLK_DEV_TRM290) += trm290.o
obj-$(CONFIG_BLK_DEV_VIA82CXXX) += via82cxxx.o

# Must appear at the end of the block
obj-$(CONFIG_BLK_DEV_GENERIC) += generic.o
obj-$(CONFIG_BLK_DEV_GENERIC) += ide-pci-generic.o
ide-pci-generic-y += generic.o

ifeq ($(CONFIG_BLK_DEV_CMD640), m)
obj-m += cmd640.o
Expand Down
13 changes: 0 additions & 13 deletions drivers/ide/pci/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,6 @@

static int ide_generic_all; /* Set to claim all devices */

/*
* the module_param_named() was added for the modular case
* the __setup() is left as compatibility for existing setups
*/
#ifndef MODULE
static int __init ide_generic_all_on(char *unused)
{
ide_generic_all = 1;
printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n");
return 1;
}
const __setup("all-generic-ide", ide_generic_all_on);
#endif
module_param_named(all_generic_ide, ide_generic_all, bool, 0444);
MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers.");

Expand Down

0 comments on commit 594765a

Please sign in to comment.