led: bcm6328: read base address in the parent node
In the device tree, the address for the led is located
in the parent node (for exemple leds), not in the led node
(for exemple led@0).
The commit "led: bcm6328: convert to use live dt"
(sha1: 8994551760
)
change this behaviour and read the address in the led node.
We fix this by reading the base address for led
in the parent node.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
This commit is contained in:
parent
cef1f0c7a4
commit
c38abed509
@ -173,7 +173,7 @@ static int bcm6328_led_probe(struct udevice *dev)
|
||||
struct bcm6328_led_priv *priv = dev_get_priv(dev);
|
||||
unsigned int pin;
|
||||
|
||||
priv->regs = dev_remap_addr(dev);
|
||||
priv->regs = dev_remap_addr(dev_get_parent(dev));
|
||||
if (!priv->regs)
|
||||
return -EINVAL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user