mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
91ddc9988e
commit
5aeddf907f
4 changed files with 30 additions and 39 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue