*
*/
#include <linux/kernel.h>
+#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/leds.h>
#include <linux/slab.h>
-#include <asm/mach-ar71xx/mach-rb750.h>
+#include <asm/mach-ath79/mach-rb750.h>
#define DRV_NAME "leds-rb750"
struct led_classdev cdev;
u32 mask;
int active_low;
+ void (*latch_change)(u32 clear, u32 set);
};
struct rb750_led_drvdata {
level ^= rbled->active_low;
if (level)
- rb750_latch_change(0, rbled->mask);
+ rbled->latch_change(0, rbled->mask);
else
- rb750_latch_change(rbled->mask, 0);
+ rbled->latch_change(rbled->mask, 0);
}
static int __devinit rb750_led_probe(struct platform_device *pdev)
rbled->mask = led_data->mask;
rbled->active_low = !!led_data->active_low;
+ rbled->latch_change = pdata->latch_change;
ret = led_classdev_register(&pdev->dev, &rbled->cdev);
if (ret)
platform_set_drvdata(pdev, drvdata);
return 0;
- err:
+err:
for (i = i - 1; i >= 0; i--)
led_classdev_unregister(&drvdata->led_devs[i].cdev);