diff options
author | Borislav Petkov <petkovbb@googlemail.com> | 2008-07-23 13:55:59 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-23 13:55:59 -0400 |
commit | d7c26ebb5bca284ece9db7311a9e180aabae1922 (patch) | |
tree | 8a1b87c735863289d87b9d9a48191776de578468 | |
parent | 4b5075050072ed7c4730ee547ae80117c4fa8513 (diff) |
ide: push pc callback pointer into the ide_drive_t structure
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>
-rw-r--r-- | include/linux/ide.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 46d5bfe2fefb..a28823297edc 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -308,7 +308,7 @@ struct ide_acpi_drive_link; | |||
308 | struct ide_acpi_hwif_link; | 308 | struct ide_acpi_hwif_link; |
309 | #endif | 309 | #endif |
310 | 310 | ||
311 | typedef struct ide_drive_s { | 311 | struct ide_drive_s { |
312 | char name[4]; /* drive name, such as "hda" */ | 312 | char name[4]; /* drive name, such as "hda" */ |
313 | char driver_req[10]; /* requests specific driver */ | 313 | char driver_req[10]; /* requests specific driver */ |
314 | 314 | ||
@@ -400,7 +400,12 @@ typedef struct ide_drive_s { | |||
400 | struct list_head list; | 400 | struct list_head list; |
401 | struct device gendev; | 401 | struct device gendev; |
402 | struct completion gendev_rel_comp; /* to deal with device release() */ | 402 | struct completion gendev_rel_comp; /* to deal with device release() */ |
403 | } ide_drive_t; | 403 | |
404 | /* callback for packet commands */ | ||
405 | void (*pc_callback)(struct ide_drive_s *); | ||
406 | }; | ||
407 | |||
408 | typedef struct ide_drive_s ide_drive_t; | ||
404 | 409 | ||
405 | #define to_ide_device(dev)container_of(dev, ide_drive_t, gendev) | 410 | #define to_ide_device(dev)container_of(dev, ide_drive_t, gendev) |
406 | 411 | ||