Browse Source

ath79: rb91x-key: replace fwnode with pdev

There's no specific fwnode handling here. Simpler to just use pdev.

Signed-off-by: Rosen Penev <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/16506
Signed-off-by: Hauke Mehrtens <[email protected]>
Rosen Penev 1 year ago
parent
commit
8c36040f04
1 changed files with 1 additions and 2 deletions
  1. 1 2
      target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c

+ 1 - 2
target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c

@@ -144,7 +144,6 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
 	struct gpio_rb91x_key *drvdata;
 	struct gpio_chip *gc;
 	struct device *dev = &pdev->dev;
-	struct fwnode_handle *fwnode = dev->fwnode;
 
 	drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
 	if (!drvdata)
@@ -159,6 +158,7 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
 
 	gc = &drvdata->gc;
 	gc->label = GPIO_RB91X_KEY_DRIVER_NAME;
+	gc->parent = dev;
 	gc->can_sleep = 1;
 	gc->base = -1;
 	gc->ngpio = GPIO_RB91X_KEY_NGPIOS;
@@ -166,7 +166,6 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
 	gc->set = gpio_rb91x_key_set;
 	gc->direction_output = gpio_rb91x_key_direction_output;
 	gc->direction_input = gpio_rb91x_key_direction_input;
-	gc->fwnode = fwnode;
 
 	platform_set_drvdata(pdev, drvdata);