mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-07 11:30:37 +00:00
ath79: gpio-latch-mikrotik: remove fwnode
Not needed. Can just use dev. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16350 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
c4f2626694
commit
65ed475450
@ -110,7 +110,6 @@ static int gpio_latch_probe(struct platform_device *pdev)
|
|||||||
struct gpio_latch_chip *glc;
|
struct gpio_latch_chip *glc;
|
||||||
struct gpio_chip *gc;
|
struct gpio_chip *gc;
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct fwnode_handle *fwnode = dev->fwnode;
|
|
||||||
int i, n;
|
int i, n;
|
||||||
|
|
||||||
glc = devm_kzalloc(dev, sizeof(*glc), GFP_KERNEL);
|
glc = devm_kzalloc(dev, sizeof(*glc), GFP_KERNEL);
|
||||||
@ -147,13 +146,13 @@ static int gpio_latch_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
gc = &glc->gc;
|
gc = &glc->gc;
|
||||||
gc->label = GPIO_LATCH_DRIVER_NAME;
|
gc->label = GPIO_LATCH_DRIVER_NAME;
|
||||||
|
gc->parent = dev;
|
||||||
gc->can_sleep = true;
|
gc->can_sleep = true;
|
||||||
gc->base = -1;
|
gc->base = -1;
|
||||||
gc->ngpio = GPIO_LATCH_LINES;
|
gc->ngpio = GPIO_LATCH_LINES;
|
||||||
gc->get = gpio_latch_get;
|
gc->get = gpio_latch_get;
|
||||||
gc->set = gpio_latch_set;
|
gc->set = gpio_latch_set;
|
||||||
gc->direction_output = gpio_latch_direction_output;
|
gc->direction_output = gpio_latch_direction_output;
|
||||||
gc->fwnode = fwnode;
|
|
||||||
|
|
||||||
return devm_gpiochip_add_data(dev, gc, glc);
|
return devm_gpiochip_add_data(dev, gc, glc);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user