linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 22/63] ide-cd: remove struct atapi_{mechstat_header,changer_info,slot}
@ 2007-12-20  1:09 Bartlomiej Zolnierkiewicz
  2007-12-21 12:33 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-12-20  1:09 UTC (permalink / raw)
  To: linux-ide; +Cc: linux-kernel


* Remove ->changer_info from struct cdrom_info (it is never allocated).

* Remove unused struct atapi_{mechstat_header,changer_info,slot}.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
-11 bytes
 drivers/ide/ide-cd.c |    1 
 drivers/ide/ide-cd.h |   55 ---------------------------------------------------
 2 files changed, 56 deletions(-)

Index: b/drivers/ide/ide-cd.c
===================================================================
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -2948,7 +2948,6 @@ static void ide_cd_release(struct kref *
 
 	kfree(info->buffer);
 	kfree(info->toc);
-	kfree(info->changer_info);
 	if (devinfo->handle == drive && unregister_cdrom(devinfo))
 		printk(KERN_ERR "%s: %s failed to unregister device from the cdrom "
 				"driver.\n", __FUNCTION__, drive->name);
Index: b/drivers/ide/ide-cd.h
===================================================================
--- a/drivers/ide/ide-cd.h
+++ b/drivers/ide/ide-cd.h
@@ -357,59 +357,6 @@ struct atapi_capabilities_page {
 	char pad[4];
 };
 
-
-struct atapi_mechstat_header {
-#if defined(__BIG_ENDIAN_BITFIELD)
-	__u8 fault         : 1;
-	__u8 changer_state : 2;
-	__u8 curslot       : 5;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
-	__u8 curslot       : 5;
-	__u8 changer_state : 2;
-	__u8 fault         : 1;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-
-#if defined(__BIG_ENDIAN_BITFIELD)
-	__u8 mech_state    : 3;
-	__u8 door_open     : 1;
-	__u8 reserved1     : 4;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
-	__u8 reserved1     : 4;
-	__u8 door_open     : 1;
-	__u8 mech_state    : 3;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-
-	byte     curlba[3];
-	byte     nslots;
-	__u16	 slot_tablelen;
-};
-
-
-struct atapi_slot {
-#if defined(__BIG_ENDIAN_BITFIELD)
-	__u8 disc_present : 1;
-	__u8 reserved1    : 6;
-	__u8 change       : 1;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
-	__u8 change       : 1;
-	__u8 reserved1    : 6;
-	__u8 disc_present : 1;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-
-	byte reserved2[3];
-};
-
-struct atapi_changer_info {
-	struct atapi_mechstat_header hdr;
-	struct atapi_slot slots[0];
-};
-
 /* Extra per-device info for cdrom drives. */
 struct cdrom_info {
 	ide_drive_t	*drive;
@@ -434,8 +381,6 @@ struct cdrom_info {
 	int dma;
 	unsigned long last_block;
 	unsigned long start_seek;
-	/* Buffer to hold mechanism status and changer slot table. */
-	struct atapi_changer_info *changer_info;
 
 	struct ide_cd_config_flags	config_flags;
 	struct ide_cd_state_flags	state_flags;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 22/63] ide-cd: remove struct atapi_{mechstat_header,changer_info,slot}
  2007-12-20  1:09 [PATCH 22/63] ide-cd: remove struct atapi_{mechstat_header,changer_info,slot} Bartlomiej Zolnierkiewicz
@ 2007-12-21 12:33 ` Sergei Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2007-12-21 12:33 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel

Bartlomiej Zolnierkiewicz wrote:

> * Remove ->changer_info from struct cdrom_info (it is never allocated).

> * Remove unused struct atapi_{mechstat_header,changer_info,slot}.

> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

MBR, Sergei


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-21 12:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-20  1:09 [PATCH 22/63] ide-cd: remove struct atapi_{mechstat_header,changer_info,slot} Bartlomiej Zolnierkiewicz
2007-12-21 12:33 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).