Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162815
b: refs/heads/master
c: 70ebadc
h: refs/heads/master
i:
  162813: e3d018a
  162811: d79c399
  162807: 3bdba1c
  162799: 688cb07
  162783: 1620c42
  162751: 52102e1
  162687: 1958357
  162559: 8fce623
  162303: dca10f0
  161791: 4f3f503
v: v3
  • Loading branch information
Julia Lawall authored and Ralf Baechle committed Sep 17, 2009
1 parent 6366dfb commit 78e05b1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13680ade4e57090a8ccad332e84e1f3d48b67125
refs/heads/master: 70ebadc8e30efef3bf21ba94b3571537de8bcf4e
17 changes: 13 additions & 4 deletions trunk/arch/mips/txx9/generic/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ void __init txx9_iocled_init(unsigned long baseaddr,
return;
iocled->mmioaddr = ioremap(baseaddr, 1);
if (!iocled->mmioaddr)
return;
goto out_free;
iocled->chip.get = txx9_iocled_get;
iocled->chip.set = txx9_iocled_set;
iocled->chip.direction_input = txx9_iocled_dir_in;
Expand All @@ -791,13 +791,13 @@ void __init txx9_iocled_init(unsigned long baseaddr,
iocled->chip.base = basenum;
iocled->chip.ngpio = num;
if (gpiochip_add(&iocled->chip))
return;
goto out_unmap;
if (basenum < 0)
basenum = iocled->chip.base;

pdev = platform_device_alloc("leds-gpio", basenum);
if (!pdev)
return;
goto out_gpio;
iocled->pdata.num_leds = num;
iocled->pdata.leds = iocled->leds;
for (i = 0; i < num; i++) {
Expand All @@ -812,7 +812,16 @@ void __init txx9_iocled_init(unsigned long baseaddr,
}
pdev->dev.platform_data = &iocled->pdata;
if (platform_device_add(pdev))
platform_device_put(pdev);
goto out_pdev;
return;
out_pdev:
platform_device_put(pdev);
out_gpio:
gpio_remove(&iocled->chip);
out_unmap:
iounmap(iocled->mmioaddr);
out_free:
kfree(iocled);
}
#else /* CONFIG_LEDS_GPIO */
void __init txx9_iocled_init(unsigned long baseaddr,
Expand Down

0 comments on commit 78e05b1

Please sign in to comment.