Skip to contentSkip to conversation

compile out scsi_ioctl when no SCSI/IDE/etc.

PATCH New Stéphane Fillod 1 participant 1 message Mar 17, 2005 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compile out scsi_ioctl when no SCSI/IDE/etc.

Hi,

This patch compiles out scsi_ioctl for embedded system with no SCSI/IDE/etc, and saves couple KiB.
It was made against linuxppc 2.6.10pre3, but should apply ok against current version.
Rem: If need be, the Kconfig part can be rewritten with "select".

drivers/block/Kconfig +5 -0
@@ -429,4 +429,9 @@
 
 source "drivers/block/Kconfig.iosched"
 
+config CDROM_SCSI_IOCTL
+	bool
+	depends on IDE || PARIDE || SCSI || CD_NO_IDESCSI 
+	default y
+
 endmenu
drivers/block/Makefile +2 -1
@@ -13,8 +13,9 @@
 # kblockd threads
 #
 
-obj-y	:= elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o
+obj-y	:= elevator.o ll_rw_blk.o ioctl.o genhd.o
 
+obj-$(CONFIG_SCSI_IOCTL)	+= scsi_ioctl.o
 obj-$(CONFIG_IOSCHED_NOOP)	+= noop-iosched.o
 obj-$(CONFIG_IOSCHED_AS)	+= as-iosched.o
 obj-$(CONFIG_IOSCHED_DEADLINE)	+= deadline-iosched.o

Best Regards,

Signature · 1 line
Stephane Fillod