aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-09-22 15:54:53 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-22 16:01:40 -0400
commitae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (patch)
tree3c2086ab67398a019089a47ca3f362a4bc6db74f /arch/mips/txx9
parent34e84f39a27d059a3e6ec6e8b94aafa702e6f220 (diff)
parent9173a8ef24a6b1b8031507b35b8ffe5f85a87692 (diff)
Merge branch 'master' into for-linus
Diffstat (limited to 'arch/mips/txx9')
-rw-r--r--arch/mips/txx9/generic/pci.c13
-rw-r--r--arch/mips/txx9/generic/setup.c17
2 files changed, 26 insertions, 4 deletions
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c
index 7b637a7c0e66..707cfa9c547d 100644
--- a/arch/mips/txx9/generic/pci.c
+++ b/arch/mips/txx9/generic/pci.c
@@ -341,6 +341,15 @@ static void quirk_slc90e66_ide(struct pci_dev *dev)
341} 341}
342#endif /* CONFIG_TOSHIBA_FPCIB0 */ 342#endif /* CONFIG_TOSHIBA_FPCIB0 */
343 343
344static void tc35815_fixup(struct pci_dev *dev)
345{
346 /* This device may have PM registers but not they are not suported. */
347 if (dev->pm_cap) {
348 dev_info(&dev->dev, "PM disabled\n");
349 dev->pm_cap = 0;
350 }
351}
352
344static void final_fixup(struct pci_dev *dev) 353static void final_fixup(struct pci_dev *dev)
345{ 354{
346 unsigned char bist; 355 unsigned char bist;
@@ -374,6 +383,10 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1,
374DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1, 383DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1,
375 quirk_slc90e66_ide); 384 quirk_slc90e66_ide);
376#endif 385#endif
386DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_TOSHIBA_2,
387 PCI_DEVICE_ID_TOSHIBA_TC35815_NWU, tc35815_fixup);
388DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_TOSHIBA_2,
389 PCI_DEVICE_ID_TOSHIBA_TC35815_TX4939, tc35815_fixup);
377DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, final_fixup); 390DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, final_fixup);
378DECLARE_PCI_FIXUP_RESUME(PCI_ANY_ID, PCI_ANY_ID, final_fixup); 391DECLARE_PCI_FIXUP_RESUME(PCI_ANY_ID, PCI_ANY_ID, final_fixup);
379 392
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index a205e2ba8e7b..c860810722c0 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -782,7 +782,7 @@ void __init txx9_iocled_init(unsigned long baseaddr,
782 return; 782 return;
783 iocled->mmioaddr = ioremap(baseaddr, 1); 783 iocled->mmioaddr = ioremap(baseaddr, 1);
784 if (!iocled->mmioaddr) 784 if (!iocled->mmioaddr)
785 return; 785 goto out_free;
786 iocled->chip.get = txx9_iocled_get; 786 iocled->chip.get = txx9_iocled_get;
787 iocled->chip.set = txx9_iocled_set; 787 iocled->chip.set = txx9_iocled_set;
788 iocled->chip.direction_input = txx9_iocled_dir_in; 788 iocled->chip.direction_input = txx9_iocled_dir_in;
@@ -791,13 +791,13 @@ void __init txx9_iocled_init(unsigned long baseaddr,
791 iocled->chip.base = basenum; 791 iocled->chip.base = basenum;
792 iocled->chip.ngpio = num; 792 iocled->chip.ngpio = num;
793 if (gpiochip_add(&iocled->chip)) 793 if (gpiochip_add(&iocled->chip))
794 return; 794 goto out_unmap;
795 if (basenum < 0) 795 if (basenum < 0)
796 basenum = iocled->chip.base; 796 basenum = iocled->chip.base;
797 797
798 pdev = platform_device_alloc("leds-gpio", basenum); 798 pdev = platform_device_alloc("leds-gpio", basenum);
799 if (!pdev) 799 if (!pdev)
800 return; 800 goto out_gpio;
801 iocled->pdata.num_leds = num; 801 iocled->pdata.num_leds = num;
802 iocled->pdata.leds = iocled->leds; 802 iocled->pdata.leds = iocled->leds;
803 for (i = 0; i < num; i++) { 803 for (i = 0; i < num; i++) {
@@ -812,7 +812,16 @@ void __init txx9_iocled_init(unsigned long baseaddr,
812 } 812 }
813 pdev->dev.platform_data = &iocled->pdata; 813 pdev->dev.platform_data = &iocled->pdata;
814 if (platform_device_add(pdev)) 814 if (platform_device_add(pdev))
815 platform_device_put(pdev); 815 goto out_pdev;
816 return;
817out_pdev:
818 platform_device_put(pdev);
819out_gpio:
820 gpio_remove(&iocled->chip);
821out_unmap:
822 iounmap(iocled->mmioaddr);
823out_free:
824 kfree(iocled);
816} 825}
817#else /* CONFIG_LEDS_GPIO */ 826#else /* CONFIG_LEDS_GPIO */
818void __init txx9_iocled_init(unsigned long baseaddr, 827void __init txx9_iocled_init(unsigned long baseaddr,