Skip to content

Commit

Permalink
ide: push pc callback pointer into the ide_drive_t structure
Browse files Browse the repository at this point in the history
Refrain from carrying the callback ptr with every packet command since the
callback function is only one anyways. ide_drive_t is probably not the most
suitable place for it right now but is the more sane solution. Besides, these
structs are going to be reorganized anyways during the generic ide rewrite.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Borislav Petkov authored and Bartlomiej Zolnierkiewicz committed Jul 23, 2008
1 parent 4b50750 commit d7c26eb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ struct ide_acpi_drive_link;
struct ide_acpi_hwif_link;
#endif

typedef struct ide_drive_s {
struct ide_drive_s {
char name[4]; /* drive name, such as "hda" */
char driver_req[10]; /* requests specific driver */

Expand Down Expand Up @@ -400,7 +400,12 @@ typedef struct ide_drive_s {
struct list_head list;
struct device gendev;
struct completion gendev_rel_comp; /* to deal with device release() */
} ide_drive_t;

/* callback for packet commands */
void (*pc_callback)(struct ide_drive_s *);
};

typedef struct ide_drive_s ide_drive_t;

#define to_ide_device(dev)container_of(dev, ide_drive_t, gendev)

Expand Down

0 comments on commit d7c26eb

Please sign in to comment.