diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:53 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:53 -0500 |
commit | 7f3c868ba78e486bd9d7569f884dd46d8f59bb18 (patch) | |
tree | c52ff0d21b22ae60194a462d565a6caf2518b569 /drivers | |
parent | 9892ec5497af1ec38c46974b5a370ba11c636b19 (diff) |
ide: remove ide_driver_t typedef
While at it:
- s/struct ide_driver_s/struct ide_driver/
- use to_ide_driver() macro in ide-proc.c
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide-cd.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-cd.h | 8 | ||||
-rw-r--r-- | drivers/ide/ide-gd.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-gd.h | 10 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 12 | ||||
-rw-r--r-- | drivers/ide/ide-pm.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-proc.c | 16 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 10 | ||||
-rw-r--r-- | drivers/ide/ide-taskfile.c | 8 | ||||
-rw-r--r-- | drivers/ide/ide.c | 6 |
10 files changed, 38 insertions, 38 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index c35b64d495f5..bc982dfacc36 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -1914,7 +1914,7 @@ static void ide_cd_release(struct kref *kref) | |||
1914 | 1914 | ||
1915 | static int ide_cd_probe(ide_drive_t *); | 1915 | static int ide_cd_probe(ide_drive_t *); |
1916 | 1916 | ||
1917 | static ide_driver_t ide_cdrom_driver = { | 1917 | static struct ide_driver ide_cdrom_driver = { |
1918 | .gen_driver = { | 1918 | .gen_driver = { |
1919 | .owner = THIS_MODULE, | 1919 | .owner = THIS_MODULE, |
1920 | .name = "ide-cdrom", | 1920 | .name = "ide-cdrom", |
diff --git a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h index d5ae036af00c..ac40d6cb90a2 100644 --- a/drivers/ide/ide-cd.h +++ b/drivers/ide/ide-cd.h | |||
@@ -77,10 +77,10 @@ struct atapi_toc { | |||
77 | 77 | ||
78 | /* Extra per-device info for cdrom drives. */ | 78 | /* Extra per-device info for cdrom drives. */ |
79 | struct cdrom_info { | 79 | struct cdrom_info { |
80 | ide_drive_t *drive; | 80 | ide_drive_t *drive; |
81 | ide_driver_t *driver; | 81 | struct ide_driver *driver; |
82 | struct gendisk *disk; | 82 | struct gendisk *disk; |
83 | struct kref kref; | 83 | struct kref kref; |
84 | 84 | ||
85 | /* Buffer for table of contents. NULL if we haven't allocated | 85 | /* Buffer for table of contents. NULL if we haven't allocated |
86 | a TOC buffer for this device yet. */ | 86 | a TOC buffer for this device yet. */ |
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c index b8078b3231f7..cae82b3c432a 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c | |||
@@ -149,7 +149,7 @@ static int ide_gd_end_request(ide_drive_t *drive, int uptodate, int nrsecs) | |||
149 | return drive->disk_ops->end_request(drive, uptodate, nrsecs); | 149 | return drive->disk_ops->end_request(drive, uptodate, nrsecs); |
150 | } | 150 | } |
151 | 151 | ||
152 | static ide_driver_t ide_gd_driver = { | 152 | static struct ide_driver ide_gd_driver = { |
153 | .gen_driver = { | 153 | .gen_driver = { |
154 | .owner = THIS_MODULE, | 154 | .owner = THIS_MODULE, |
155 | .name = "ide-gd", | 155 | .name = "ide-gd", |
diff --git a/drivers/ide/ide-gd.h b/drivers/ide/ide-gd.h index 7d3d101713e0..a86779f0756b 100644 --- a/drivers/ide/ide-gd.h +++ b/drivers/ide/ide-gd.h | |||
@@ -14,11 +14,11 @@ | |||
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | struct ide_disk_obj { | 16 | struct ide_disk_obj { |
17 | ide_drive_t *drive; | 17 | ide_drive_t *drive; |
18 | ide_driver_t *driver; | 18 | struct ide_driver *driver; |
19 | struct gendisk *disk; | 19 | struct gendisk *disk; |
20 | struct kref kref; | 20 | struct kref kref; |
21 | unsigned int openers; /* protected by BKL for now */ | 21 | unsigned int openers; /* protected by BKL for now */ |
22 | 22 | ||
23 | /* Last failed packet command */ | 23 | /* Last failed packet command */ |
24 | struct ide_atapi_pc *failed_pc; | 24 | struct ide_atapi_pc *failed_pc; |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 0e2b95ec08a5..e788b3622f2e 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -199,9 +199,9 @@ EXPORT_SYMBOL(ide_end_drive_cmd); | |||
199 | static void ide_kill_rq(ide_drive_t *drive, struct request *rq) | 199 | static void ide_kill_rq(ide_drive_t *drive, struct request *rq) |
200 | { | 200 | { |
201 | if (rq->rq_disk) { | 201 | if (rq->rq_disk) { |
202 | ide_driver_t *drv; | 202 | struct ide_driver *drv; |
203 | 203 | ||
204 | drv = *(ide_driver_t **)rq->rq_disk->private_data; | 204 | drv = *(struct ide_driver **)rq->rq_disk->private_data; |
205 | drv->end_request(drive, 0, 0); | 205 | drv->end_request(drive, 0, 0); |
206 | } else | 206 | } else |
207 | ide_end_request(drive, 0, 0); | 207 | ide_end_request(drive, 0, 0); |
@@ -333,9 +333,9 @@ ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, u8 stat) | |||
333 | } | 333 | } |
334 | 334 | ||
335 | if (rq->rq_disk) { | 335 | if (rq->rq_disk) { |
336 | ide_driver_t *drv; | 336 | struct ide_driver *drv; |
337 | 337 | ||
338 | drv = *(ide_driver_t **)rq->rq_disk->private_data; | 338 | drv = *(struct ide_driver **)rq->rq_disk->private_data; |
339 | return drv->error(drive, rq, stat, err); | 339 | return drv->error(drive, rq, stat, err); |
340 | } else | 340 | } else |
341 | return __ide_error(drive, rq, stat, err); | 341 | return __ide_error(drive, rq, stat, err); |
@@ -606,7 +606,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) | |||
606 | return startstop; | 606 | return startstop; |
607 | } | 607 | } |
608 | if (!drive->special.all) { | 608 | if (!drive->special.all) { |
609 | ide_driver_t *drv; | 609 | struct ide_driver *drv; |
610 | 610 | ||
611 | /* | 611 | /* |
612 | * We reset the drive so we need to issue a SETFEATURES. | 612 | * We reset the drive so we need to issue a SETFEATURES. |
@@ -639,7 +639,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) | |||
639 | */ | 639 | */ |
640 | return ide_special_rq(drive, rq); | 640 | return ide_special_rq(drive, rq); |
641 | 641 | ||
642 | drv = *(ide_driver_t **)rq->rq_disk->private_data; | 642 | drv = *(struct ide_driver **)rq->rq_disk->private_data; |
643 | 643 | ||
644 | return drv->do_request(drive, rq, rq->sector); | 644 | return drv->do_request(drive, rq, rq->sector); |
645 | } | 645 | } |
diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c index 0c206c68bbb1..4b3bf6a06b70 100644 --- a/drivers/ide/ide-pm.c +++ b/drivers/ide/ide-pm.c | |||
@@ -67,7 +67,7 @@ int generic_ide_resume(struct device *dev) | |||
67 | blk_put_request(rq); | 67 | blk_put_request(rq); |
68 | 68 | ||
69 | if (err == 0 && dev->driver) { | 69 | if (err == 0 && dev->driver) { |
70 | ide_driver_t *drv = to_ide_driver(dev->driver); | 70 | struct ide_driver *drv = to_ide_driver(dev->driver); |
71 | 71 | ||
72 | if (drv->resume) | 72 | if (drv->resume) |
73 | drv->resume(drive); | 73 | drv->resume(drive); |
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index a14e2938e4f3..d985a9ec6bef 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -439,13 +439,13 @@ static int proc_ide_read_dmodel | |||
439 | static int proc_ide_read_driver | 439 | static int proc_ide_read_driver |
440 | (char *page, char **start, off_t off, int count, int *eof, void *data) | 440 | (char *page, char **start, off_t off, int count, int *eof, void *data) |
441 | { | 441 | { |
442 | ide_drive_t *drive = (ide_drive_t *) data; | 442 | ide_drive_t *drive = (ide_drive_t *)data; |
443 | struct device *dev = &drive->gendev; | 443 | struct device *dev = &drive->gendev; |
444 | ide_driver_t *ide_drv; | 444 | struct ide_driver *ide_drv; |
445 | int len; | 445 | int len; |
446 | 446 | ||
447 | if (dev->driver) { | 447 | if (dev->driver) { |
448 | ide_drv = container_of(dev->driver, ide_driver_t, gen_driver); | 448 | ide_drv = to_ide_driver(dev->driver); |
449 | len = sprintf(page, "%s version %s\n", | 449 | len = sprintf(page, "%s version %s\n", |
450 | dev->driver->name, ide_drv->version); | 450 | dev->driver->name, ide_drv->version); |
451 | } else | 451 | } else |
@@ -555,7 +555,7 @@ static void ide_remove_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t | |||
555 | } | 555 | } |
556 | } | 556 | } |
557 | 557 | ||
558 | void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver) | 558 | void ide_proc_register_driver(ide_drive_t *drive, struct ide_driver *driver) |
559 | { | 559 | { |
560 | mutex_lock(&ide_setting_mtx); | 560 | mutex_lock(&ide_setting_mtx); |
561 | drive->settings = driver->proc_devsets(drive); | 561 | drive->settings = driver->proc_devsets(drive); |
@@ -577,7 +577,7 @@ EXPORT_SYMBOL(ide_proc_register_driver); | |||
577 | * Takes ide_setting_mtx. | 577 | * Takes ide_setting_mtx. |
578 | */ | 578 | */ |
579 | 579 | ||
580 | void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) | 580 | void ide_proc_unregister_driver(ide_drive_t *drive, struct ide_driver *driver) |
581 | { | 581 | { |
582 | ide_remove_proc_entries(drive->proc, driver->proc_entries(drive)); | 582 | ide_remove_proc_entries(drive->proc, driver->proc_entries(drive)); |
583 | 583 | ||
@@ -653,7 +653,7 @@ void ide_proc_unregister_port(ide_hwif_t *hwif) | |||
653 | 653 | ||
654 | static int proc_print_driver(struct device_driver *drv, void *data) | 654 | static int proc_print_driver(struct device_driver *drv, void *data) |
655 | { | 655 | { |
656 | ide_driver_t *ide_drv = container_of(drv, ide_driver_t, gen_driver); | 656 | struct ide_driver *ide_drv = to_ide_driver(drv); |
657 | struct seq_file *s = data; | 657 | struct seq_file *s = data; |
658 | 658 | ||
659 | seq_printf(s, "%s version %s\n", drv->name, ide_drv->version); | 659 | seq_printf(s, "%s version %s\n", drv->name, ide_drv->version); |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index e39f2f46d982..fd865039bfdb 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -166,10 +166,10 @@ struct idetape_bh { | |||
166 | * to an interrupt or a timer event is stored in the struct defined below. | 166 | * to an interrupt or a timer event is stored in the struct defined below. |
167 | */ | 167 | */ |
168 | typedef struct ide_tape_obj { | 168 | typedef struct ide_tape_obj { |
169 | ide_drive_t *drive; | 169 | ide_drive_t *drive; |
170 | ide_driver_t *driver; | 170 | struct ide_driver *driver; |
171 | struct gendisk *disk; | 171 | struct gendisk *disk; |
172 | struct kref kref; | 172 | struct kref kref; |
173 | 173 | ||
174 | /* | 174 | /* |
175 | * failed_pc points to the last failed packet command, or contains | 175 | * failed_pc points to the last failed packet command, or contains |
@@ -2313,7 +2313,7 @@ static const struct ide_proc_devset *ide_tape_proc_devsets(ide_drive_t *drive) | |||
2313 | 2313 | ||
2314 | static int ide_tape_probe(ide_drive_t *); | 2314 | static int ide_tape_probe(ide_drive_t *); |
2315 | 2315 | ||
2316 | static ide_driver_t idetape_driver = { | 2316 | static struct ide_driver idetape_driver = { |
2317 | .gen_driver = { | 2317 | .gen_driver = { |
2318 | .owner = THIS_MODULE, | 2318 | .owner = THIS_MODULE, |
2319 | .name = "ide-tape", | 2319 | .name = "ide-tape", |
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 55d451ce9b4f..16138bce84a7 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -309,9 +309,9 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq, | |||
309 | } | 309 | } |
310 | 310 | ||
311 | if (sectors > 0) { | 311 | if (sectors > 0) { |
312 | ide_driver_t *drv; | 312 | struct ide_driver *drv; |
313 | 313 | ||
314 | drv = *(ide_driver_t **)rq->rq_disk->private_data; | 314 | drv = *(struct ide_driver **)rq->rq_disk->private_data; |
315 | drv->end_request(drive, 1, sectors); | 315 | drv->end_request(drive, 1, sectors); |
316 | } | 316 | } |
317 | } | 317 | } |
@@ -328,9 +328,9 @@ void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat) | |||
328 | } | 328 | } |
329 | 329 | ||
330 | if (rq->rq_disk) { | 330 | if (rq->rq_disk) { |
331 | ide_driver_t *drv; | 331 | struct ide_driver *drv; |
332 | 332 | ||
333 | drv = *(ide_driver_t **)rq->rq_disk->private_data;; | 333 | drv = *(struct ide_driver **)rq->rq_disk->private_data;; |
334 | drv->end_request(drive, 1, rq->nr_sectors); | 334 | drv->end_request(drive, 1, rq->nr_sectors); |
335 | } else | 335 | } else |
336 | ide_end_request(drive, 1, rq->nr_sectors); | 336 | ide_end_request(drive, 1, rq->nr_sectors); |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index c1bb0f6784a9..6971c285a212 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -281,7 +281,7 @@ static int ide_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
281 | static int generic_ide_probe(struct device *dev) | 281 | static int generic_ide_probe(struct device *dev) |
282 | { | 282 | { |
283 | ide_drive_t *drive = to_ide_device(dev); | 283 | ide_drive_t *drive = to_ide_device(dev); |
284 | ide_driver_t *drv = to_ide_driver(dev->driver); | 284 | struct ide_driver *drv = to_ide_driver(dev->driver); |
285 | 285 | ||
286 | return drv->probe ? drv->probe(drive) : -ENODEV; | 286 | return drv->probe ? drv->probe(drive) : -ENODEV; |
287 | } | 287 | } |
@@ -289,7 +289,7 @@ static int generic_ide_probe(struct device *dev) | |||
289 | static int generic_ide_remove(struct device *dev) | 289 | static int generic_ide_remove(struct device *dev) |
290 | { | 290 | { |
291 | ide_drive_t *drive = to_ide_device(dev); | 291 | ide_drive_t *drive = to_ide_device(dev); |
292 | ide_driver_t *drv = to_ide_driver(dev->driver); | 292 | struct ide_driver *drv = to_ide_driver(dev->driver); |
293 | 293 | ||
294 | if (drv->remove) | 294 | if (drv->remove) |
295 | drv->remove(drive); | 295 | drv->remove(drive); |
@@ -300,7 +300,7 @@ static int generic_ide_remove(struct device *dev) | |||
300 | static void generic_ide_shutdown(struct device *dev) | 300 | static void generic_ide_shutdown(struct device *dev) |
301 | { | 301 | { |
302 | ide_drive_t *drive = to_ide_device(dev); | 302 | ide_drive_t *drive = to_ide_device(dev); |
303 | ide_driver_t *drv = to_ide_driver(dev->driver); | 303 | struct ide_driver *drv = to_ide_driver(dev->driver); |
304 | 304 | ||
305 | if (dev->driver && drv->shutdown) | 305 | if (dev->driver && drv->shutdown) |
306 | drv->shutdown(drive); | 306 | drv->shutdown(drive); |