Skip to contentSkip to conversation

ide-cd: move code handling cdrom.c IOCTLs to ide-cd_ioctl.c

PATCH In review Bartlomiej Zolnierkiewicz 1 participant 1 message Dec 20, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 44/63 ide-cd: move code handling cdrom.c IOCTLs to ide-cd_ioctl.c

There should be no functionality changes caused by this patch.

---
 drivers/ide/Makefile       |    2 
 drivers/ide/ide-cd.c       |  271 +--------------------------------------------
 drivers/ide/ide-cd.h       |   17 ++
 drivers/ide/ide-cd_ioctl.c |  265 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 290 insertions(+), 265 deletions(-)
drivers/ide/Makefile +1 -1
Index: b/drivers/ide/Makefile
===================================================================
@@ -40,7 +40,7 @@ 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
+ide-cd_mod-y += ide-cd.o ide-cd_ioctl.o ide-cd_verbose.o
 
 obj-$(CONFIG_BLK_DEV_IDEDISK)		+= ide-disk.o
 obj-$(CONFIG_BLK_DEV_IDECD)		+= ide-cd_mod.o
drivers/ide/ide-cd.c +7 -264

332 lines not on this page · raw message

drivers/ide/ide-cd.h +17 -0
Index: b/drivers/ide/ide-cd.h
===================================================================
@@ -148,4 +148,21 @@ struct cdrom_info {
 /* ide-cd_verbose.c */
 void ide_cd_log_error(const char *, struct request *, struct request_sense *);
 
+/* ide-cd.c functions used by ide-cd_ioctl.c */
+void ide_cd_init_rq(ide_drive_t *, struct request *);
+int ide_cd_queue_pc(ide_drive_t *, struct request *);
+int ide_cd_lockdoor(ide_drive_t *, int, struct request_sense *);
+int ide_cd_read_toc(ide_drive_t *, struct request_sense *);
+int ide_cdrom_get_capabilities(ide_drive_t *, u8 *);
+void ide_cdrom_update_speed(ide_drive_t *, u8 *);
+
+/* ide-cd_ioctl.c */
+int ide_cdrom_lock_door(struct cdrom_device_info *, int);
+int ide_cdrom_select_speed(struct cdrom_device_info *, int);
+int ide_cdrom_get_last_session(struct cdrom_device_info *,
+			       struct cdrom_multisession *);
+int ide_cdrom_get_mcn(struct cdrom_device_info *, struct cdrom_mcn *);
+int ide_cdrom_reset(struct cdrom_device_info *cdi);
+int ide_cdrom_audio_ioctl(struct cdrom_device_info *, unsigned int, void *);
+
 #endif /* _IDE_CD_H */
drivers/ide/ide-cd_ioctl.c new file +265 -0

265 lines not on this page · raw message