diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-05-09 18:01:09 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-05-09 18:01:09 -0400 |
commit | ecfd80e4a514123070b4cfb674b817ba75055df2 (patch) | |
tree | 956baa39e22030d139803b7585bd71e91c637bb5 /drivers/ide/pci | |
parent | 29e744d088e3555f4efbdf390f01088dd66993b6 (diff) |
ide: make /proc/ide/ optional
All important information/features should be already available through
sysfs and ioctl interfaces.
Add CONFIG_IDE_PROC_FS (CONFIG_SCSI_PROC_FS rip-off) config option,
disabling it makes IDE driver ~5 kB smaller (on x86-32).
While at it add CONFIG_PROC_FS=n versions of proc_ide_{create,destroy}()
and remove no longer needed #ifdefs.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/alim15x3.c | 8 | ||||
-rw-r--r-- | drivers/ide/pci/amd74xx.c | 6 | ||||
-rw-r--r-- | drivers/ide/pci/cmd64x.c | 8 | ||||
-rw-r--r-- | drivers/ide/pci/sis5513.c | 6 |
4 files changed, 14 insertions, 14 deletions
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 76643b626bdd..428efdae0c7b 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -50,7 +50,7 @@ static u8 m5229_revision; | |||
50 | static u8 chip_is_1543c_e; | 50 | static u8 chip_is_1543c_e; |
51 | static struct pci_dev *isa_dev; | 51 | static struct pci_dev *isa_dev; |
52 | 52 | ||
53 | #if defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS) | 53 | #if defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_IDE_PROC_FS) |
54 | #include <linux/stat.h> | 54 | #include <linux/stat.h> |
55 | #include <linux/proc_fs.h> | 55 | #include <linux/proc_fs.h> |
56 | 56 | ||
@@ -278,7 +278,7 @@ static int ali_get_info (char *buffer, char **addr, off_t offset, int count) | |||
278 | 278 | ||
279 | return p-buffer; /* => must be less than 4k! */ | 279 | return p-buffer; /* => must be less than 4k! */ |
280 | } | 280 | } |
281 | #endif /* defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS) */ | 281 | #endif /* defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_IDE_PROC_FS) */ |
282 | 282 | ||
283 | /** | 283 | /** |
284 | * ali15x3_tune_pio - set up chipset for PIO mode | 284 | * ali15x3_tune_pio - set up chipset for PIO mode |
@@ -566,13 +566,13 @@ static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c | |||
566 | 566 | ||
567 | isa_dev = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL); | 567 | isa_dev = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL); |
568 | 568 | ||
569 | #if defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS) | 569 | #if defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_IDE_PROC_FS) |
570 | if (!ali_proc) { | 570 | if (!ali_proc) { |
571 | ali_proc = 1; | 571 | ali_proc = 1; |
572 | bmide_dev = dev; | 572 | bmide_dev = dev; |
573 | ide_pci_create_host_proc("ali", ali_get_info); | 573 | ide_pci_create_host_proc("ali", ali_get_info); |
574 | } | 574 | } |
575 | #endif /* defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS) */ | 575 | #endif /* defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_IDE_PROC_FS) */ |
576 | 576 | ||
577 | local_irq_save(flags); | 577 | local_irq_save(flags); |
578 | 578 | ||
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index 7989bdd842a2..becb1a5648b0 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c | |||
@@ -92,7 +92,7 @@ static unsigned char amd_cyc2udma[] = { 6, 6, 5, 4, 0, 1, 1, 2, 2, 3, 3, 3, 3, 3 | |||
92 | * AMD /proc entry. | 92 | * AMD /proc entry. |
93 | */ | 93 | */ |
94 | 94 | ||
95 | #ifdef CONFIG_PROC_FS | 95 | #ifdef CONFIG_IDE_PROC_FS |
96 | 96 | ||
97 | #include <linux/stat.h> | 97 | #include <linux/stat.h> |
98 | #include <linux/proc_fs.h> | 98 | #include <linux/proc_fs.h> |
@@ -402,14 +402,14 @@ static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, const ch | |||
402 | * Register /proc/ide/amd74xx entry | 402 | * Register /proc/ide/amd74xx entry |
403 | */ | 403 | */ |
404 | 404 | ||
405 | #if defined(DISPLAY_AMD_TIMINGS) && defined(CONFIG_PROC_FS) | 405 | #if defined(DISPLAY_AMD_TIMINGS) && defined(CONFIG_IDE_PROC_FS) |
406 | if (!amd74xx_proc) { | 406 | if (!amd74xx_proc) { |
407 | amd_base = pci_resource_start(dev, 4); | 407 | amd_base = pci_resource_start(dev, 4); |
408 | bmide_dev = dev; | 408 | bmide_dev = dev; |
409 | ide_pci_create_host_proc("amd74xx", amd74xx_get_info); | 409 | ide_pci_create_host_proc("amd74xx", amd74xx_get_info); |
410 | amd74xx_proc = 1; | 410 | amd74xx_proc = 1; |
411 | } | 411 | } |
412 | #endif /* DISPLAY_AMD_TIMINGS && CONFIG_PROC_FS */ | 412 | #endif /* DISPLAY_AMD_TIMINGS && CONFIG_IDE_PROC_FS */ |
413 | 413 | ||
414 | return dev->irq; | 414 | return dev->irq; |
415 | } | 415 | } |
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 19f5ac1f866c..61ea96b5555c 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -74,7 +74,7 @@ | |||
74 | #define UDIDETCR1 0x7B | 74 | #define UDIDETCR1 0x7B |
75 | #define DTPR1 0x7C | 75 | #define DTPR1 0x7C |
76 | 76 | ||
77 | #if defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) | 77 | #if defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_IDE_PROC_FS) |
78 | #include <linux/stat.h> | 78 | #include <linux/stat.h> |
79 | #include <linux/proc_fs.h> | 79 | #include <linux/proc_fs.h> |
80 | 80 | ||
@@ -165,7 +165,7 @@ static int cmd64x_get_info (char *buffer, char **addr, off_t offset, int count) | |||
165 | return p-buffer; /* => must be less than 4k! */ | 165 | return p-buffer; /* => must be less than 4k! */ |
166 | } | 166 | } |
167 | 167 | ||
168 | #endif /* defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) */ | 168 | #endif /* defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_IDE_PROC_FS) */ |
169 | 169 | ||
170 | static u8 quantize_timing(int timing, int quant) | 170 | static u8 quantize_timing(int timing, int quant) |
171 | { | 171 | { |
@@ -548,7 +548,7 @@ static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev, const cha | |||
548 | (void) pci_write_config_byte(dev, UDIDETCR0, 0xf0); | 548 | (void) pci_write_config_byte(dev, UDIDETCR0, 0xf0); |
549 | #endif /* CONFIG_PPC */ | 549 | #endif /* CONFIG_PPC */ |
550 | 550 | ||
551 | #if defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) | 551 | #if defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_IDE_PROC_FS) |
552 | 552 | ||
553 | cmd_devs[n_cmd_devs++] = dev; | 553 | cmd_devs[n_cmd_devs++] = dev; |
554 | 554 | ||
@@ -556,7 +556,7 @@ static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev, const cha | |||
556 | cmd64x_proc = 1; | 556 | cmd64x_proc = 1; |
557 | ide_pci_create_host_proc("cmd64x", cmd64x_get_info); | 557 | ide_pci_create_host_proc("cmd64x", cmd64x_get_info); |
558 | } | 558 | } |
559 | #endif /* DISPLAY_CMD64X_TIMINGS && CONFIG_PROC_FS */ | 559 | #endif /* DISPLAY_CMD64X_TIMINGS && CONFIG_IDE_PROC_FS */ |
560 | 560 | ||
561 | return 0; | 561 | return 0; |
562 | } | 562 | } |
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 41953fe4fa6b..2bde1b92784a 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -191,7 +191,7 @@ static char* chipset_capability[] = { | |||
191 | "ATA 133 (1st gen)", "ATA 133 (2nd gen)" | 191 | "ATA 133 (1st gen)", "ATA 133 (2nd gen)" |
192 | }; | 192 | }; |
193 | 193 | ||
194 | #if defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_PROC_FS) | 194 | #if defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_IDE_PROC_FS) |
195 | #include <linux/stat.h> | 195 | #include <linux/stat.h> |
196 | #include <linux/proc_fs.h> | 196 | #include <linux/proc_fs.h> |
197 | 197 | ||
@@ -426,7 +426,7 @@ static int sis_get_info (char *buffer, char **addr, off_t offset, int count) | |||
426 | 426 | ||
427 | return len > count ? count : len; | 427 | return len > count ? count : len; |
428 | } | 428 | } |
429 | #endif /* defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_PROC_FS) */ | 429 | #endif /* defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_IDE_PROC_FS) */ |
430 | 430 | ||
431 | /* | 431 | /* |
432 | * Configuration functions | 432 | * Configuration functions |
@@ -797,7 +797,7 @@ static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev, const c | |||
797 | break; | 797 | break; |
798 | } | 798 | } |
799 | 799 | ||
800 | #if defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_PROC_FS) | 800 | #if defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_IDE_PROC_FS) |
801 | if (!sis_proc) { | 801 | if (!sis_proc) { |
802 | sis_proc = 1; | 802 | sis_proc = 1; |
803 | bmide_dev = dev; | 803 | bmide_dev = dev; |