diff options
author | Borislav Petkov <petkovbb@googlemail.com> | 2008-10-13 15:39:34 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 15:39:34 -0400 |
commit | 5aeddf907f149cae7e19b7c23ccea3823d00698c (patch) | |
tree | c3507ed9a078f94bb091ed6557f570927b34f255 /include/linux/ide.h | |
parent | 91ddc9988efeaed487eb7dd81d2557e1b1d501ef (diff) |
ide: unify conversion macros
Introduce to_ide_drv() and ide_drv_g() macros and replace the respective
definitions of similar ones in each driver.
There should be no functionality change resulting from this patch.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 85cb96c1fd61..350ef47ed616 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -570,7 +570,13 @@ struct ide_drive_s { | |||
570 | 570 | ||
571 | typedef struct ide_drive_s ide_drive_t; | 571 | typedef struct ide_drive_s ide_drive_t; |
572 | 572 | ||
573 | #define to_ide_device(dev)container_of(dev, ide_drive_t, gendev) | 573 | #define to_ide_device(dev) container_of(dev, ide_drive_t, gendev) |
574 | |||
575 | #define to_ide_drv(obj, cont_type) \ | ||
576 | container_of(obj, struct cont_type, kref) | ||
577 | |||
578 | #define ide_drv_g(disk, cont_type) \ | ||
579 | container_of((disk)->private_data, struct cont_type, driver) | ||
574 | 580 | ||
575 | struct ide_task_s; | 581 | struct ide_task_s; |
576 | struct ide_port_info; | 582 | struct ide_port_info; |