diff options
author | Tejun Heo <htejun@gmail.com> | 2007-01-20 02:00:28 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-09 17:39:37 -0500 |
commit | 24dc5f33ea4b504cfbd23fa159a4cacba8e4d800 (patch) | |
tree | d76de456157f555c9a65b83f426fd805fee1e846 /drivers/ata/pata_amd.c | |
parent | f0d36efdc624beb3d9e29b9ab9e9537bf0f25d5b (diff) |
libata: update libata LLDs to use devres
Update libata LLDs to use devres. Core layer is already converted to
support managed LLDs. This patch simplifies initialization and fixes
many resource related bugs in init failure and detach path. For
example, all converted drivers now handle ata_device_add() failure
gracefully without excessive resource rollback code.
As most resources are released automatically on driver detach, many
drivers don't need or can do with much simpler ->{port|host}_stop().
In general, stop callbacks are need iff port or host needs to be given
commands to shut it down. Note that freezing is enough in many cases
and ports are automatically frozen before being detached.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_amd.c')
-rw-r--r-- | drivers/ata/pata_amd.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index a6b330089f22..7ee0c83c657a 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c | |||
@@ -368,8 +368,6 @@ static struct ata_port_operations amd33_port_ops = { | |||
368 | .irq_clear = ata_bmdma_irq_clear, | 368 | .irq_clear = ata_bmdma_irq_clear, |
369 | 369 | ||
370 | .port_start = ata_port_start, | 370 | .port_start = ata_port_start, |
371 | .port_stop = ata_port_stop, | ||
372 | .host_stop = ata_host_stop | ||
373 | }; | 371 | }; |
374 | 372 | ||
375 | static struct ata_port_operations amd66_port_ops = { | 373 | static struct ata_port_operations amd66_port_ops = { |
@@ -402,8 +400,6 @@ static struct ata_port_operations amd66_port_ops = { | |||
402 | .irq_clear = ata_bmdma_irq_clear, | 400 | .irq_clear = ata_bmdma_irq_clear, |
403 | 401 | ||
404 | .port_start = ata_port_start, | 402 | .port_start = ata_port_start, |
405 | .port_stop = ata_port_stop, | ||
406 | .host_stop = ata_host_stop | ||
407 | }; | 403 | }; |
408 | 404 | ||
409 | static struct ata_port_operations amd100_port_ops = { | 405 | static struct ata_port_operations amd100_port_ops = { |
@@ -436,8 +432,6 @@ static struct ata_port_operations amd100_port_ops = { | |||
436 | .irq_clear = ata_bmdma_irq_clear, | 432 | .irq_clear = ata_bmdma_irq_clear, |
437 | 433 | ||
438 | .port_start = ata_port_start, | 434 | .port_start = ata_port_start, |
439 | .port_stop = ata_port_stop, | ||
440 | .host_stop = ata_host_stop | ||
441 | }; | 435 | }; |
442 | 436 | ||
443 | static struct ata_port_operations amd133_port_ops = { | 437 | static struct ata_port_operations amd133_port_ops = { |
@@ -470,8 +464,6 @@ static struct ata_port_operations amd133_port_ops = { | |||
470 | .irq_clear = ata_bmdma_irq_clear, | 464 | .irq_clear = ata_bmdma_irq_clear, |
471 | 465 | ||
472 | .port_start = ata_port_start, | 466 | .port_start = ata_port_start, |
473 | .port_stop = ata_port_stop, | ||
474 | .host_stop = ata_host_stop | ||
475 | }; | 467 | }; |
476 | 468 | ||
477 | static struct ata_port_operations nv100_port_ops = { | 469 | static struct ata_port_operations nv100_port_ops = { |
@@ -504,8 +496,6 @@ static struct ata_port_operations nv100_port_ops = { | |||
504 | .irq_clear = ata_bmdma_irq_clear, | 496 | .irq_clear = ata_bmdma_irq_clear, |
505 | 497 | ||
506 | .port_start = ata_port_start, | 498 | .port_start = ata_port_start, |
507 | .port_stop = ata_port_stop, | ||
508 | .host_stop = ata_host_stop | ||
509 | }; | 499 | }; |
510 | 500 | ||
511 | static struct ata_port_operations nv133_port_ops = { | 501 | static struct ata_port_operations nv133_port_ops = { |
@@ -538,8 +528,6 @@ static struct ata_port_operations nv133_port_ops = { | |||
538 | .irq_clear = ata_bmdma_irq_clear, | 528 | .irq_clear = ata_bmdma_irq_clear, |
539 | 529 | ||
540 | .port_start = ata_port_start, | 530 | .port_start = ata_port_start, |
541 | .port_stop = ata_port_stop, | ||
542 | .host_stop = ata_host_stop | ||
543 | }; | 531 | }; |
544 | 532 | ||
545 | static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | 533 | static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |