| * Atheros AR71XX/AR724X/AR913X common GPIO LEDs support |
| * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> |
| * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> |
| * This program is free software; you can redistribute it and/or modify it |
| * under the terms of the GNU General Public License version 2 as published |
| * by the Free Software Foundation. |
| #include <linux/platform_device.h> |
| #include "dev-leds-gpio.h" |
| void __init ath79_register_leds_gpio(int id, |
| struct platform_device *pdev; |
| struct gpio_led_platform_data pdata; |
| p = kmemdup(leds, num_leds * sizeof(*p), GFP_KERNEL); |
| pdev = platform_device_alloc("leds-gpio", id); |
| memset(&pdata, 0, sizeof(pdata)); |
| pdata.num_leds = num_leds; |
| err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); |
| err = platform_device_add(pdev); |
| platform_device_put(pdev); |