Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecfd80e4 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 29e744d0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -291,6 +291,17 @@ config IDE_TASK_IOCTL

	  If you are unsure, say N here.

config IDE_PROC_FS
	bool "legacy /proc/ide/ support"
	depends on IDE && PROC_FS
	default y
	help
	  This option enables support for the various files in
	  /proc/ide.  In Linux 2.6 this has been superseded by
	  files in sysfs but many legacy applications rely on this.

	  If unsure say Y.

comment "IDE chipset support/bugfixes"

config IDE_GENERIC
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ ide-core-$(CONFIG_BLK_DEV_CMD640) += pci/cmd640.o
# Core IDE code - must come before legacy
ide-core-$(CONFIG_BLK_DEV_IDEPCI)	+= setup-pci.o
ide-core-$(CONFIG_BLK_DEV_IDEDMA)	+= ide-dma.o
ide-core-$(CONFIG_PROC_FS)		+= ide-proc.o
ide-core-$(CONFIG_IDE_PROC_FS)		+= ide-proc.o
ide-core-$(CONFIG_BLK_DEV_IDEPNP)	+= ide-pnp.o
ide-core-$(CONFIG_BLK_DEV_IDEACPI)	+= ide-acpi.o

+2 −2
Original line number Diff line number Diff line
@@ -3274,7 +3274,7 @@ int ide_cdrom_setup (ide_drive_t *drive)
	return 0;
}

#ifdef CONFIG_PROC_FS
#ifdef CONFIG_IDE_PROC_FS
static
sector_t ide_cdrom_capacity (ide_drive_t *drive)
{
@@ -3321,7 +3321,7 @@ static void ide_cd_release(struct kref *kref)

static int ide_cd_probe(ide_drive_t *);

#ifdef CONFIG_PROC_FS
#ifdef CONFIG_IDE_PROC_FS
static int proc_idecd_read_capacity
	(char *page, char **start, off_t off, int count, int *eof, void *data)
{
+2 −2
Original line number Diff line number Diff line
@@ -559,7 +559,7 @@ static sector_t idedisk_capacity (ide_drive_t *drive)
	return drive->capacity64 - drive->sect0;
}

#ifdef CONFIG_PROC_FS
#ifdef CONFIG_IDE_PROC_FS

static int smart_enable(ide_drive_t *drive)
{
@@ -683,7 +683,7 @@ static ide_proc_entry_t idedisk_proc[] = {

#define	idedisk_proc	NULL

#endif	/* CONFIG_PROC_FS */
#endif	/* CONFIG_IDE_PROC_FS */

static void idedisk_prepare_flush(request_queue_t *q, struct request *rq)
{
+2 −2
Original line number Diff line number Diff line
@@ -1892,7 +1892,7 @@ static void ide_floppy_release(struct kref *kref)
	kfree(floppy);
}

#ifdef CONFIG_PROC_FS
#ifdef CONFIG_IDE_PROC_FS

static int proc_idefloppy_read_capacity
	(char *page, char **start, off_t off, int count, int *eof, void *data)
@@ -1914,7 +1914,7 @@ static ide_proc_entry_t idefloppy_proc[] = {

#define	idefloppy_proc	NULL

#endif	/* CONFIG_PROC_FS */
#endif	/* CONFIG_IDE_PROC_FS */

static int ide_floppy_probe(ide_drive_t *);

Loading