Эх сурвалжийг харах

block: Rework drivers/cdrom/Makefile

Instead of referring from inside drivers/cdrom/Makefile to all the
drivers that use this driver, let these drivers select the cdrom
driver. This change makes the cdrom build code follow the approach
that is used for most other drivers, namely refer from the higher
layers to the lower layer instead of from the lower layer to the
higher layers.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Bart Van Assche 7 жил өмнө
parent
commit
2a750166a5

+ 12 - 0
drivers/block/Kconfig

@@ -67,9 +67,20 @@ config AMIGA_Z2RAM
 	  To compile this driver as a module, choose M here: the
 	  To compile this driver as a module, choose M here: the
 	  module will be called z2ram.
 	  module will be called z2ram.
 
 
+config CDROM
+	tristate "CD-ROM driver"
+	help
+	  A CD-ROM is a pre-pressed optical compact disc which contains
+	  data. The name is an acronym which stands for "Compact Disc
+	  Read-Only Memory". This driver implements functionality that is
+	  shared by all CD-ROM drivers, e.g. the IDE CD-ROM driver and the
+	  SCSI CD-ROM driver. For a list of the ioctls implemented by this
+	  driver, see also Documentation/ioctl/cdrom.txt.
+
 config GDROM
 config GDROM
 	tristate "SEGA Dreamcast GD-ROM drive"
 	tristate "SEGA Dreamcast GD-ROM drive"
 	depends on SH_DREAMCAST
 	depends on SH_DREAMCAST
+	select CDROM
 	select BLK_SCSI_REQUEST # only for the generic cdrom code
 	select BLK_SCSI_REQUEST # only for the generic cdrom code
 	help
 	help
 	  A standard SEGA Dreamcast comes with a modified CD ROM drive called a
 	  A standard SEGA Dreamcast comes with a modified CD ROM drive called a
@@ -347,6 +358,7 @@ config BLK_DEV_RAM_DAX
 config CDROM_PKTCDVD
 config CDROM_PKTCDVD
 	tristate "Packet writing on CD/DVD media (DEPRECATED)"
 	tristate "Packet writing on CD/DVD media (DEPRECATED)"
 	depends on !UML
 	depends on !UML
+	select CDROM
 	select BLK_SCSI_REQUEST
 	select BLK_SCSI_REQUEST
 	help
 	help
 	  Note: This driver is deprecated and will be removed from the
 	  Note: This driver is deprecated and will be removed from the

+ 1 - 0
drivers/block/paride/Kconfig

@@ -25,6 +25,7 @@ config PARIDE_PD
 config PARIDE_PCD
 config PARIDE_PCD
 	tristate "Parallel port ATAPI CD-ROMs"
 	tristate "Parallel port ATAPI CD-ROMs"
 	depends on PARIDE
 	depends on PARIDE
+	select CDROM
 	select BLK_SCSI_REQUEST # only for the generic cdrom code
 	select BLK_SCSI_REQUEST # only for the generic cdrom code
 	---help---
 	---help---
 	  This option enables the high-level driver for ATAPI CD-ROM devices
 	  This option enables the high-level driver for ATAPI CD-ROM devices

+ 2 - 13
drivers/cdrom/Makefile

@@ -1,13 +1,2 @@
-# Makefile for the kernel cdrom device drivers.
-#
-# 30 Jan 1998, Michael Elizabeth Chastain, <mailto:mec@shout.net>
-# Rewritten to use lists instead of if-statements.
-
-# Each configuration option enables a list of files.
-
-obj-$(CONFIG_BLK_DEV_IDECD)	+=              cdrom.o
-obj-$(CONFIG_BLK_DEV_SR)	+=              cdrom.o
-obj-$(CONFIG_PARIDE_PCD)	+=		cdrom.o
-obj-$(CONFIG_CDROM_PKTCDVD)	+=		cdrom.o
-
-obj-$(CONFIG_GDROM)		+= gdrom.o      cdrom.o
+obj-$(CONFIG_CDROM)	+= cdrom.o
+obj-$(CONFIG_GDROM)	+= gdrom.o

+ 1 - 0
drivers/ide/Kconfig

@@ -118,6 +118,7 @@ config BLK_DEV_DELKIN
 config BLK_DEV_IDECD
 config BLK_DEV_IDECD
 	tristate "Include IDE/ATAPI CDROM support"
 	tristate "Include IDE/ATAPI CDROM support"
 	select IDE_ATAPI
 	select IDE_ATAPI
+	select CDROM
 	---help---
 	---help---
 	  If you have a CD-ROM drive using the ATAPI protocol, say Y. ATAPI is
 	  If you have a CD-ROM drive using the ATAPI protocol, say Y. ATAPI is
 	  a newer protocol used by IDE CD-ROM and TAPE drives, similar to the
 	  a newer protocol used by IDE CD-ROM and TAPE drives, similar to the

+ 1 - 0
drivers/scsi/Kconfig

@@ -131,6 +131,7 @@ config CHR_DEV_OSST
 config BLK_DEV_SR
 config BLK_DEV_SR
 	tristate "SCSI CDROM support"
 	tristate "SCSI CDROM support"
 	depends on SCSI
 	depends on SCSI
+	select CDROM
 	---help---
 	---help---
 	  If you want to use a CD or DVD drive attached to your computer
 	  If you want to use a CD or DVD drive attached to your computer
 	  by SCSI, FireWire, USB or ATAPI, say Y and read the SCSI-HOWTO
 	  by SCSI, FireWire, USB or ATAPI, say Y and read the SCSI-HOWTO