ath79: fix build error for downstream gpio drivers

Initialize fwnode instead of the deprecated of_node.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
This commit is contained in:
Shiji Yang 2024-04-29 20:26:17 +00:00 committed by Hauke Mehrtens
parent 63b8d98dd0
commit 24693ac7e5
2 changed files with 4 additions and 4 deletions

View File

@ -110,7 +110,7 @@ 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 device_node *of_node = dev->of_node; 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);
@ -158,7 +158,7 @@ static int gpio_latch_probe(struct platform_device *pdev)
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->of_node = of_node; gc->fwnode = fwnode;
platform_set_drvdata(pdev, glc); platform_set_drvdata(pdev, glc);

View File

@ -144,7 +144,7 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
struct gpio_rb91x_key *drvdata; struct gpio_rb91x_key *drvdata;
struct gpio_chip *gc; struct gpio_chip *gc;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *of_node = dev->of_node; struct fwnode_handle *fwnode = dev->fwnode;
int r; int r;
drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
@ -172,7 +172,7 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
gc->set = gpio_rb91x_key_set; gc->set = gpio_rb91x_key_set;
gc->direction_output = gpio_rb91x_key_direction_output; gc->direction_output = gpio_rb91x_key_direction_output;
gc->direction_input = gpio_rb91x_key_direction_input; gc->direction_input = gpio_rb91x_key_direction_input;
gc->of_node = of_node; gc->fwnode = fwnode;
platform_set_drvdata(pdev, drvdata); platform_set_drvdata(pdev, drvdata);