aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:47 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:47 -0400
commit931ee0dc5c69e8113233d21942681ab8fecde7f9 (patch)
tree5de3137f0eb3557727c1233c92b558256408f92c /drivers
parentdbac9f895f628deebc99dee86dfd21c1823013c3 (diff)
ide: remove obsoleted "ide=" kernel parameters
* Remove obsoleted "ide=" kernel parameters. * Remove no longer needed: - ide_setup() - parse_options() - __setup("", ...) - module_param(options, ...) * Use module_{init,exit}() for MODULE=y case and remove MODULE ifdef. * Make ide_*acpi* and ide_doubler variables static. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-acpi.c6
-rw-r--r--drivers/ide/ide-dma.c2
-rw-r--r--drivers/ide/ide.c91
-rw-r--r--drivers/ide/legacy/gayle.c4
4 files changed, 10 insertions, 93 deletions
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index 9d3601fa5680..6f704628c27d 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -60,15 +60,15 @@ struct ide_acpi_hwif_link {
60#define DEBPRINT(fmt, args...) do {} while (0) 60#define DEBPRINT(fmt, args...) do {} while (0)
61#endif /* DEBUGGING */ 61#endif /* DEBUGGING */
62 62
63int ide_noacpi; 63static int ide_noacpi;
64module_param_named(noacpi, ide_noacpi, bool, 0); 64module_param_named(noacpi, ide_noacpi, bool, 0);
65MODULE_PARM_DESC(noacpi, "disable IDE ACPI support"); 65MODULE_PARM_DESC(noacpi, "disable IDE ACPI support");
66 66
67int ide_acpigtf; 67static int ide_acpigtf;
68module_param_named(acpigtf, ide_acpigtf, bool, 0); 68module_param_named(acpigtf, ide_acpigtf, bool, 0);
69MODULE_PARM_DESC(acpigtf, "enable IDE ACPI _GTF support"); 69MODULE_PARM_DESC(acpigtf, "enable IDE ACPI _GTF support");
70 70
71int ide_acpionboot; 71static int ide_acpionboot;
72module_param_named(acpionboot, ide_acpionboot, bool, 0); 72module_param_named(acpionboot, ide_acpionboot, bool, 0);
73MODULE_PARM_DESC(acpionboot, "call IDE ACPI methods on boot"); 73MODULE_PARM_DESC(acpionboot, "call IDE ACPI methods on boot");
74 74
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 653b1ade13d3..174f4704614c 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -692,7 +692,7 @@ static int ide_tune_dma(ide_drive_t *drive)
692 ide_hwif_t *hwif = drive->hwif; 692 ide_hwif_t *hwif = drive->hwif;
693 u8 speed; 693 u8 speed;
694 694
695 if (noautodma || drive->nodma || (drive->id->capability & 1) == 0) 695 if (drive->nodma || (drive->id->capability & 1) == 0)
696 return 0; 696 return 0;
697 697
698 /* consult the list of known "bad" drives */ 698 /* consult the list of known "bad" drives */
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index e8c88ff2f6b6..1defba3eefe7 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -87,9 +87,9 @@ static const u8 ide_hwif_to_major[] = { IDE0_MAJOR, IDE1_MAJOR,
87 IDE8_MAJOR, IDE9_MAJOR }; 87 IDE8_MAJOR, IDE9_MAJOR };
88 88
89DEFINE_MUTEX(ide_cfg_mtx); 89DEFINE_MUTEX(ide_cfg_mtx);
90 __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock);
91 90
92int noautodma = 0; 91__cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock);
92EXPORT_SYMBOL(ide_lock);
93 93
94ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */ 94ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */
95 95
@@ -698,59 +698,6 @@ set_val:
698 698
699EXPORT_SYMBOL(generic_ide_ioctl); 699EXPORT_SYMBOL(generic_ide_ioctl);
700 700
701/*
702 * ide_setup() gets called VERY EARLY during initialization,
703 * to handle kernel "command line" strings beginning with "ide".
704 *
705 * Remember to update Documentation/ide/ide.txt if you change something here.
706 */
707static int __init ide_setup(char *s)
708{
709 printk(KERN_INFO "ide_setup: %s", s);
710
711#ifdef CONFIG_BLK_DEV_IDEDOUBLER
712 if (!strcmp(s, "ide=doubler")) {
713 extern int ide_doubler;
714
715 printk(" : Enabled support for IDE doublers\n");
716 ide_doubler = 1;
717 goto obsolete_option;
718 }
719#endif /* CONFIG_BLK_DEV_IDEDOUBLER */
720
721 if (!strcmp(s, "ide=nodma")) {
722 printk(" : Prevented DMA\n");
723 noautodma = 1;
724 goto obsolete_option;
725 }
726
727#ifdef CONFIG_BLK_DEV_IDEACPI
728 if (!strcmp(s, "ide=noacpi")) {
729 //printk(" : Disable IDE ACPI support.\n");
730 ide_noacpi = 1;
731 goto obsolete_option;
732 }
733 if (!strcmp(s, "ide=acpigtf")) {
734 //printk(" : Enable IDE ACPI _GTF support.\n");
735 ide_acpigtf = 1;
736 goto obsolete_option;
737 }
738 if (!strcmp(s, "ide=acpionboot")) {
739 //printk(" : Call IDE ACPI methods on boot.\n");
740 ide_acpionboot = 1;
741 goto obsolete_option;
742 }
743#endif /* CONFIG_BLK_DEV_IDEACPI */
744
745 printk(" -- BAD OPTION\n");
746 return 1;
747obsolete_option:
748 printk(" -- OBSOLETE OPTION, WILL BE REMOVED SOON!\n");
749 return 1;
750}
751
752EXPORT_SYMBOL(ide_lock);
753
754static int ide_bus_match(struct device *dev, struct device_driver *drv) 701static int ide_bus_match(struct device *dev, struct device_driver *drv)
755{ 702{
756 return 1; 703 return 1;
@@ -1087,32 +1034,7 @@ out_port_class:
1087 return ret; 1034 return ret;
1088} 1035}
1089 1036
1090#ifdef MODULE 1037static void __exit ide_exit(void)
1091static char *options = NULL;
1092module_param(options, charp, 0);
1093MODULE_LICENSE("GPL");
1094
1095static void __init parse_options (char *line)
1096{
1097 char *next = line;
1098
1099 if (line == NULL || !*line)
1100 return;
1101 while ((line = next) != NULL) {
1102 if ((next = strchr(line,' ')) != NULL)
1103 *next++ = 0;
1104 if (!ide_setup(line))
1105 printk (KERN_INFO "Unknown option '%s'\n", line);
1106 }
1107}
1108
1109int __init init_module (void)
1110{
1111 parse_options(options);
1112 return ide_init();
1113}
1114
1115void __exit cleanup_module (void)
1116{ 1038{
1117 proc_ide_destroy(); 1039 proc_ide_destroy();
1118 1040
@@ -1121,10 +1043,7 @@ void __exit cleanup_module (void)
1121 bus_unregister(&ide_bus_type); 1043 bus_unregister(&ide_bus_type);
1122} 1044}
1123 1045
1124#else /* !MODULE */
1125
1126__setup("", ide_setup);
1127
1128module_init(ide_init); 1046module_init(ide_init);
1047module_exit(ide_exit);
1129 1048
1130#endif /* MODULE */ 1049MODULE_LICENSE("GPL");
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c
index fed7d812761c..b78941680c32 100644
--- a/drivers/ide/legacy/gayle.c
+++ b/drivers/ide/legacy/gayle.c
@@ -64,9 +64,7 @@
64#define GAYLE_HAS_CONTROL_REG (!ide_doubler) 64#define GAYLE_HAS_CONTROL_REG (!ide_doubler)
65#define GAYLE_IDEREG_SIZE (ide_doubler ? 0x1000 : 0x2000) 65#define GAYLE_IDEREG_SIZE (ide_doubler ? 0x1000 : 0x2000)
66 66
67int ide_doubler = 0; /* support IDE doublers? */ 67static int ide_doubler;
68EXPORT_SYMBOL_GPL(ide_doubler);
69
70module_param_named(doubler, ide_doubler, bool, 0); 68module_param_named(doubler, ide_doubler, bool, 0);
71MODULE_PARM_DESC(doubler, "enable support for IDE doublers"); 69MODULE_PARM_DESC(doubler, "enable support for IDE doublers");
72#endif /* CONFIG_BLK_DEV_IDEDOUBLER */ 70#endif /* CONFIG_BLK_DEV_IDEDOUBLER */