diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 14:17:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 14:17:04 -0400 |
commit | 0c93ea4064a209cdc36de8a9a3003d43d08f46f7 (patch) | |
tree | ff19952407c523a1349ef56c05993416dd28437e /drivers/ide | |
parent | bc2fd381d8f9dbeb181f82286cdca1567e3d0def (diff) | |
parent | e6e66b02e11563abdb7f69dcb7a2efbd8d577e77 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (61 commits)
Dynamic debug: fix pr_fmt() build error
Dynamic debug: allow simple quoting of words
dynamic debug: update docs
dynamic debug: combine dprintk and dynamic printk
sysfs: fix some bin_vm_ops errors
kobject: don't block for each kobject_uevent
sysfs: only allow one scheduled removal callback per kobj
Driver core: Fix device_move() vs. dpm list ordering, v2
Driver core: some cleanup on drivers/base/sys.c
Driver core: implement uevent suppress in kobject
vcs: hook sysfs devices into object lifetime instead of "binding"
driver core: fix passing platform_data
driver core: move platform_data into platform_device
sysfs: don't block indefinitely for unmapped files.
driver core: move knode_bus into private structure
driver core: move knode_driver into private structure
driver core: move klist_children into private structure
driver core: create a private portion of struct device
driver core: remove polling for driver_probe_done(v5)
sysfs: reference sysfs_dirent from sysfs inodes
...
Fixed conflicts in drivers/sh/maple/maple.c manually
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/au1xxx-ide.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/ide/au1xxx-ide.c b/drivers/ide/au1xxx-ide.c index 79a2dfed8eb7..154ec2cf734f 100644 --- a/drivers/ide/au1xxx-ide.c +++ b/drivers/ide/au1xxx-ide.c | |||
@@ -536,9 +536,8 @@ static const struct ide_port_info au1xxx_port_info = { | |||
536 | #endif | 536 | #endif |
537 | }; | 537 | }; |
538 | 538 | ||
539 | static int au_ide_probe(struct device *dev) | 539 | static int au_ide_probe(struct platform_device *dev) |
540 | { | 540 | { |
541 | struct platform_device *pdev = to_platform_device(dev); | ||
542 | _auide_hwif *ahwif = &auide_hwif; | 541 | _auide_hwif *ahwif = &auide_hwif; |
543 | struct resource *res; | 542 | struct resource *res; |
544 | struct ide_host *host; | 543 | struct ide_host *host; |
@@ -552,23 +551,23 @@ static int au_ide_probe(struct device *dev) | |||
552 | #endif | 551 | #endif |
553 | 552 | ||
554 | memset(&auide_hwif, 0, sizeof(_auide_hwif)); | 553 | memset(&auide_hwif, 0, sizeof(_auide_hwif)); |
555 | ahwif->irq = platform_get_irq(pdev, 0); | 554 | ahwif->irq = platform_get_irq(dev, 0); |
556 | 555 | ||
557 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 556 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); |
558 | 557 | ||
559 | if (res == NULL) { | 558 | if (res == NULL) { |
560 | pr_debug("%s %d: no base address\n", DRV_NAME, pdev->id); | 559 | pr_debug("%s %d: no base address\n", DRV_NAME, dev->id); |
561 | ret = -ENODEV; | 560 | ret = -ENODEV; |
562 | goto out; | 561 | goto out; |
563 | } | 562 | } |
564 | if (ahwif->irq < 0) { | 563 | if (ahwif->irq < 0) { |
565 | pr_debug("%s %d: no IRQ\n", DRV_NAME, pdev->id); | 564 | pr_debug("%s %d: no IRQ\n", DRV_NAME, dev->id); |
566 | ret = -ENODEV; | 565 | ret = -ENODEV; |
567 | goto out; | 566 | goto out; |
568 | } | 567 | } |
569 | 568 | ||
570 | if (!request_mem_region(res->start, res->end - res->start + 1, | 569 | if (!request_mem_region(res->start, res->end - res->start + 1, |
571 | pdev->name)) { | 570 | dev->name)) { |
572 | pr_debug("%s: request_mem_region failed\n", DRV_NAME); | 571 | pr_debug("%s: request_mem_region failed\n", DRV_NAME); |
573 | ret = -EBUSY; | 572 | ret = -EBUSY; |
574 | goto out; | 573 | goto out; |
@@ -583,7 +582,7 @@ static int au_ide_probe(struct device *dev) | |||
583 | memset(&hw, 0, sizeof(hw)); | 582 | memset(&hw, 0, sizeof(hw)); |
584 | auide_setup_ports(&hw, ahwif); | 583 | auide_setup_ports(&hw, ahwif); |
585 | hw.irq = ahwif->irq; | 584 | hw.irq = ahwif->irq; |
586 | hw.dev = dev; | 585 | hw.dev = &dev->dev; |
587 | hw.chipset = ide_au1xxx; | 586 | hw.chipset = ide_au1xxx; |
588 | 587 | ||
589 | ret = ide_host_add(&au1xxx_port_info, hws, &host); | 588 | ret = ide_host_add(&au1xxx_port_info, hws, &host); |
@@ -592,7 +591,7 @@ static int au_ide_probe(struct device *dev) | |||
592 | 591 | ||
593 | auide_hwif.hwif = host->ports[0]; | 592 | auide_hwif.hwif = host->ports[0]; |
594 | 593 | ||
595 | dev_set_drvdata(dev, host); | 594 | platform_set_drvdata(dev, host); |
596 | 595 | ||
597 | printk(KERN_INFO "Au1xxx IDE(builtin) configured for %s\n", mode ); | 596 | printk(KERN_INFO "Au1xxx IDE(builtin) configured for %s\n", mode ); |
598 | 597 | ||
@@ -600,38 +599,39 @@ static int au_ide_probe(struct device *dev) | |||
600 | return ret; | 599 | return ret; |
601 | } | 600 | } |
602 | 601 | ||
603 | static int au_ide_remove(struct device *dev) | 602 | static int au_ide_remove(struct platform_device *dev) |
604 | { | 603 | { |
605 | struct platform_device *pdev = to_platform_device(dev); | ||
606 | struct resource *res; | 604 | struct resource *res; |
607 | struct ide_host *host = dev_get_drvdata(dev); | 605 | struct ide_host *host = platform_get_drvdata(dev); |
608 | _auide_hwif *ahwif = &auide_hwif; | 606 | _auide_hwif *ahwif = &auide_hwif; |
609 | 607 | ||
610 | ide_host_remove(host); | 608 | ide_host_remove(host); |
611 | 609 | ||
612 | iounmap((void *)ahwif->regbase); | 610 | iounmap((void *)ahwif->regbase); |
613 | 611 | ||
614 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 612 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); |
615 | release_mem_region(res->start, res->end - res->start + 1); | 613 | release_mem_region(res->start, res->end - res->start + 1); |
616 | 614 | ||
617 | return 0; | 615 | return 0; |
618 | } | 616 | } |
619 | 617 | ||
620 | static struct device_driver au1200_ide_driver = { | 618 | static struct platform_driver au1200_ide_driver = { |
621 | .name = "au1200-ide", | 619 | .driver = { |
622 | .bus = &platform_bus_type, | 620 | .name = "au1200-ide", |
621 | .owner = THIS_MODULE, | ||
622 | }, | ||
623 | .probe = au_ide_probe, | 623 | .probe = au_ide_probe, |
624 | .remove = au_ide_remove, | 624 | .remove = au_ide_remove, |
625 | }; | 625 | }; |
626 | 626 | ||
627 | static int __init au_ide_init(void) | 627 | static int __init au_ide_init(void) |
628 | { | 628 | { |
629 | return driver_register(&au1200_ide_driver); | 629 | return platform_driver_register(&au1200_ide_driver); |
630 | } | 630 | } |
631 | 631 | ||
632 | static void __exit au_ide_exit(void) | 632 | static void __exit au_ide_exit(void) |
633 | { | 633 | { |
634 | driver_unregister(&au1200_ide_driver); | 634 | platform_driver_unregister(&au1200_ide_driver); |
635 | } | 635 | } |
636 | 636 | ||
637 | MODULE_LICENSE("GPL"); | 637 | MODULE_LICENSE("GPL"); |