}
};
-static struct rb750_led_platform_data rb750_leds_data = {
- .num_leds = ARRAY_SIZE(rb750_leds),
- .leds = rb750_leds,
-};
-
+static struct rb750_led_platform_data rb750_leds_data;
static struct platform_device rb750_leds_device = {
.name = "leds-rb750",
.dev = {
/* WAN port */
ath79_register_eth(0);
+ rb750_leds_data.num_leds = ARRAY_SIZE(rb750_leds);
+ rb750_leds_data.leds = rb750_leds;
+ rb750_leds_data.latch_change = rb750_nand_latch_change;
platform_device_register(&rb750_leds_device);
rb750_nand_data.nce_line = RB750_NAND_NCE;
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)