ide-cd: move VERBOSE_IDE_CD_ERRORS code to ide-cd_verbose.c
PATCH 36/63 ide-cd: move VERBOSE_IDE_CD_ERRORS code to ide-cd_verbose.c
* Rename ide-cd kernel module to ide-cd_mod in preparation to moving code out
from ide-cd.[c,h]. Add MODULE_ALIAS("ide-cd") to preserve compatibility.
* Move VERBOSE_IDE_CD_ERRORS code from ide-cd.[c,h] to ide-cd_verbose.c.
ide-cd_verbose.c is IDE subsystem independent and may be easily converted into generic library usable by other drivers (i.e. libata) if needed.
* Add CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS config option to drivers/ide/Kconfig replacing VERBOSE_IDE_CD_ERRORS define. Make this config option enabled by default and visible only if CONFIG_EMBEDDED is defined.
before the patch:
text data bss dec hex filename
22841 360 1056 24257 5ec1 drivers/ide/ide-cd.o
after the patch w/ CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y:
text data bss dec hex filename
22857 360 1056 24273 5ed1 drivers/ide/ide-cd_mod.o
after the patch w/ CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=n:
text data bss dec hex filename
15091 360 1056 16507 407b drivers/ide/ide-cd_mod.o
--- drivers/ide/Kconfig | 9 + drivers/ide/Makefile | 4 drivers/ide/ide-cd.c | 124 -------------- drivers/ide/ide-cd.h | 237 ---------------------------- drivers/ide/ide-cd_verbose.c | 359 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 375 insertions(+), 358 deletions(-)
drivers/ide/Kconfig +9 -0
@@ -206,6 +206,15 @@ config BLK_DEV_IDECD To compile this driver as a module, choose M here: the module will be called ide-cd. +config BLK_DEV_IDECD_VERBOSE_ERRORS + bool "Verbose error logging for IDE/ATAPI CDROM driver" if EMBEDDED + depends on BLK_DEV_IDECD + default y + help + Turn this on to have the driver print out the meanings of the + ATAPI error codes. This will use up additional 8kB of kernel-space + memory, though. + config BLK_DEV_IDETAPE tristate "Include IDE/ATAPI TAPE support (EXPERIMENTAL)" depends on EXPERIMENTAL
drivers/ide/Makefile +3 -1
@@ -40,8 +40,10 @@ obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp obj-$(CONFIG_IDE_H8300) += h8300/ obj-$(CONFIG_IDE_GENERIC) += ide-generic.o +ide-cd_mod-y += ide-cd.o ide-cd_verbose.o + obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o -obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o +obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd_mod.o obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
drivers/ide/ide-cd.c +2 -122
137 lines not on this page · raw message
drivers/ide/ide-cd.h +2 -235
248 lines not on this page · raw message
drivers/ide/ide-cd_verbose.c new file +359 -0
359 lines not on this page · raw message