gpio: rockchip: make gpio-bank name with bank index

Fix the name of gpio bank to be more general, make it with bank index
instead of node name.

Change-Id: Ia7e61e2eaa2cdd8f3ff0482cfc7c857f2a505935
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This commit is contained in:
Jianqun Xu 2020-09-27 11:09:21 +08:00 committed by Tao Huang
parent 1dbe7f3096
commit 412436b9d7

View File

@ -706,8 +706,8 @@ static int rockchip_gpio_probe(struct platform_device *pdev)
if (id < 0)
id = gpio++;
bank->name = devm_kasprintf(dev, GFP_KERNEL, "%pOF", np);
bank->pin_base = id * GPIO_BANK_PIN_NUM;
bank->name = devm_kasprintf(dev, GFP_KERNEL, "GPIO%d", id);
bank->nr_pins = GPIO_BANK_PIN_NUM;
bank->dev = dev;
bank->of_node = dev->of_node;