]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/ide.h
ide: unify conversion macros
[linux-2.6-omap-h63xx.git] / include / linux / ide.h
index 85cb96c1fd6157eb56fd3ce0b1120f2b4e71a644..350ef47ed616f4d9898469eaa6656d654bc33b5c 100644 (file)
@@ -570,7 +570,13 @@ struct ide_drive_s {
 
 typedef struct ide_drive_s ide_drive_t;
 
-#define to_ide_device(dev)container_of(dev, ide_drive_t, gendev)
+#define to_ide_device(dev)             container_of(dev, ide_drive_t, gendev)
+
+#define to_ide_drv(obj, cont_type)     \
+       container_of(obj, struct cont_type, kref)
+
+#define ide_drv_g(disk, cont_type)     \
+       container_of((disk)->private_data, struct cont_type, driver)
 
 struct ide_task_s;
 struct ide_port_info;