Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: replace trivial implementations of gpio_chip request/free

Replace all trivial request/free callbacks that do nothing but call into
pinctrl code with the generic versions.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Andrew Bresticker <abrestic@chromium.org>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Lee Jones <lee@kernel.org>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Jonas Gorski and committed by
Linus Walleij
98c85d58 31831f41

+42 -290
+2 -12
drivers/pinctrl/bcm/pinctrl-bcm2835.c
··· 330 330 bcm2835_gpio_wr(pc, FSEL_REG(pin), val); 331 331 } 332 332 333 - static int bcm2835_gpio_request(struct gpio_chip *chip, unsigned offset) 334 - { 335 - return pinctrl_request_gpio(chip->base + offset); 336 - } 337 - 338 - static void bcm2835_gpio_free(struct gpio_chip *chip, unsigned offset) 339 - { 340 - pinctrl_free_gpio(chip->base + offset); 341 - } 342 - 343 333 static int bcm2835_gpio_direction_input(struct gpio_chip *chip, unsigned offset) 344 334 { 345 335 return pinctrl_gpio_direction_input(chip->base + offset); ··· 365 375 static struct gpio_chip bcm2835_gpio_chip = { 366 376 .label = MODULE_NAME, 367 377 .owner = THIS_MODULE, 368 - .request = bcm2835_gpio_request, 369 - .free = bcm2835_gpio_free, 378 + .request = gpiochip_generic_request, 379 + .free = gpiochip_generic_free, 370 380 .direction_input = bcm2835_gpio_direction_input, 371 381 .direction_output = bcm2835_gpio_direction_output, 372 382 .get = bcm2835_gpio_get,
+2 -12
drivers/pinctrl/intel/pinctrl-cherryview.c
··· 1149 1149 .owner = THIS_MODULE, 1150 1150 }; 1151 1151 1152 - static int chv_gpio_request(struct gpio_chip *chip, unsigned offset) 1153 - { 1154 - return pinctrl_request_gpio(chip->base + offset); 1155 - } 1156 - 1157 - static void chv_gpio_free(struct gpio_chip *chip, unsigned offset) 1158 - { 1159 - pinctrl_free_gpio(chip->base + offset); 1160 - } 1161 - 1162 1152 static unsigned chv_gpio_offset_to_pin(struct chv_pinctrl *pctrl, 1163 1153 unsigned offset) 1164 1154 { ··· 1228 1238 1229 1239 static const struct gpio_chip chv_gpio_chip = { 1230 1240 .owner = THIS_MODULE, 1231 - .request = chv_gpio_request, 1232 - .free = chv_gpio_free, 1241 + .request = gpiochip_generic_request, 1242 + .free = gpiochip_generic_free, 1233 1243 .get_direction = chv_gpio_get_direction, 1234 1244 .direction_input = chv_gpio_direction_input, 1235 1245 .direction_output = chv_gpio_direction_output,
+2 -12
drivers/pinctrl/intel/pinctrl-intel.c
··· 597 597 .owner = THIS_MODULE, 598 598 }; 599 599 600 - static int intel_gpio_request(struct gpio_chip *chip, unsigned offset) 601 - { 602 - return pinctrl_request_gpio(chip->base + offset); 603 - } 604 - 605 - static void intel_gpio_free(struct gpio_chip *chip, unsigned offset) 606 - { 607 - pinctrl_free_gpio(chip->base + offset); 608 - } 609 - 610 600 static int intel_gpio_get(struct gpio_chip *chip, unsigned offset) 611 601 { 612 602 struct intel_pinctrl *pctrl = gpiochip_to_pinctrl(chip); ··· 644 654 645 655 static const struct gpio_chip intel_gpio_chip = { 646 656 .owner = THIS_MODULE, 647 - .request = intel_gpio_request, 648 - .free = intel_gpio_free, 657 + .request = gpiochip_generic_request, 658 + .free = gpiochip_generic_free, 649 659 .direction_input = intel_gpio_direction_input, 650 660 .direction_output = intel_gpio_direction_output, 651 661 .get = intel_gpio_get,
+2 -12
drivers/pinctrl/mediatek/pinctrl-mtk-common.c
··· 723 723 .gpio_set_direction = mtk_pmx_gpio_set_direction, 724 724 }; 725 725 726 - static int mtk_gpio_request(struct gpio_chip *chip, unsigned offset) 727 - { 728 - return pinctrl_request_gpio(chip->base + offset); 729 - } 730 - 731 - static void mtk_gpio_free(struct gpio_chip *chip, unsigned offset) 732 - { 733 - pinctrl_free_gpio(chip->base + offset); 734 - } 735 - 736 726 static int mtk_gpio_direction_input(struct gpio_chip *chip, 737 727 unsigned offset) 738 728 { ··· 995 1005 996 1006 static struct gpio_chip mtk_gpio_chip = { 997 1007 .owner = THIS_MODULE, 998 - .request = mtk_gpio_request, 999 - .free = mtk_gpio_free, 1008 + .request = gpiochip_generic_request, 1009 + .free = gpiochip_generic_free, 1000 1010 .direction_input = mtk_gpio_direction_input, 1001 1011 .direction_output = mtk_gpio_direction_output, 1002 1012 .get = mtk_gpio_get,
+2 -16
drivers/pinctrl/nomadik/pinctrl-abx500.c
··· 654 654 #define abx500_gpio_dbg_show NULL 655 655 #endif 656 656 657 - static int abx500_gpio_request(struct gpio_chip *chip, unsigned offset) 658 - { 659 - int gpio = chip->base + offset; 660 - 661 - return pinctrl_request_gpio(gpio); 662 - } 663 - 664 - static void abx500_gpio_free(struct gpio_chip *chip, unsigned offset) 665 - { 666 - int gpio = chip->base + offset; 667 - 668 - pinctrl_free_gpio(gpio); 669 - } 670 - 671 657 static struct gpio_chip abx500gpio_chip = { 672 658 .label = "abx500-gpio", 673 659 .owner = THIS_MODULE, 674 - .request = abx500_gpio_request, 675 - .free = abx500_gpio_free, 660 + .request = gpiochip_generic_request, 661 + .free = gpiochip_generic_free, 676 662 .direction_input = abx500_gpio_direction_input, 677 663 .get = abx500_gpio_get, 678 664 .direction_output = abx500_gpio_direction_output,
+2 -20
drivers/pinctrl/nomadik/pinctrl-nomadik.c
··· 884 884 885 885 /* I/O Functions */ 886 886 887 - static int nmk_gpio_request(struct gpio_chip *chip, unsigned offset) 888 - { 889 - /* 890 - * Map back to global GPIO space and request muxing, the direction 891 - * parameter does not matter for this controller. 892 - */ 893 - int gpio = chip->base + offset; 894 - 895 - return pinctrl_request_gpio(gpio); 896 - } 897 - 898 - static void nmk_gpio_free(struct gpio_chip *chip, unsigned offset) 899 - { 900 - int gpio = chip->base + offset; 901 - 902 - pinctrl_free_gpio(gpio); 903 - } 904 - 905 887 static int nmk_gpio_make_input(struct gpio_chip *chip, unsigned offset) 906 888 { 907 889 struct nmk_gpio_chip *nmk_chip = ··· 1249 1267 spin_lock_init(&nmk_chip->lock); 1250 1268 1251 1269 chip = &nmk_chip->chip; 1252 - chip->request = nmk_gpio_request; 1253 - chip->free = nmk_gpio_free; 1270 + chip->request = gpiochip_generic_request; 1271 + chip->free = gpiochip_generic_free; 1254 1272 chip->direction_input = nmk_gpio_make_input; 1255 1273 chip->get = nmk_gpio_get_input; 1256 1274 chip->direction_output = nmk_gpio_make_output;
+2 -12
drivers/pinctrl/pinctrl-adi2.c
··· 713 713 .owner = THIS_MODULE, 714 714 }; 715 715 716 - static int adi_gpio_request(struct gpio_chip *chip, unsigned offset) 717 - { 718 - return pinctrl_request_gpio(chip->base + offset); 719 - } 720 - 721 - static void adi_gpio_free(struct gpio_chip *chip, unsigned offset) 722 - { 723 - pinctrl_free_gpio(chip->base + offset); 724 - } 725 - 726 716 static int adi_gpio_direction_input(struct gpio_chip *chip, unsigned offset) 727 717 { 728 718 struct gpio_port *port; ··· 984 994 port->chip.get = adi_gpio_get_value; 985 995 port->chip.direction_output = adi_gpio_direction_output; 986 996 port->chip.set = adi_gpio_set_value; 987 - port->chip.request = adi_gpio_request; 988 - port->chip.free = adi_gpio_free; 997 + port->chip.request = gpiochip_generic_request, 998 + port->chip.free = gpiochip_generic_free, 989 999 port->chip.to_irq = adi_gpio_to_irq; 990 1000 if (pdata->port_gpio_base > 0) 991 1001 port->chip.base = pdata->port_gpio_base;
+2 -12
drivers/pinctrl/pinctrl-as3722.c
··· 536 536 return as3722_irq_get_virq(as_pci->as3722, offset); 537 537 } 538 538 539 - static int as3722_gpio_request(struct gpio_chip *chip, unsigned offset) 540 - { 541 - return pinctrl_request_gpio(chip->base + offset); 542 - } 543 - 544 - static void as3722_gpio_free(struct gpio_chip *chip, unsigned offset) 545 - { 546 - pinctrl_free_gpio(chip->base + offset); 547 - } 548 - 549 539 static const struct gpio_chip as3722_gpio_chip = { 550 540 .label = "as3722-gpio", 551 541 .owner = THIS_MODULE, 552 - .request = as3722_gpio_request, 553 - .free = as3722_gpio_free, 542 + .request = gpiochip_generic_request, 543 + .free = gpiochip_generic_free, 554 544 .get = as3722_gpio_get, 555 545 .set = as3722_gpio_set, 556 546 .direction_input = as3722_gpio_direction_input,
+2 -24
drivers/pinctrl/pinctrl-at91.c
··· 1277 1277 return 0; 1278 1278 } 1279 1279 1280 - static int at91_gpio_request(struct gpio_chip *chip, unsigned offset) 1281 - { 1282 - /* 1283 - * Map back to global GPIO space and request muxing, the direction 1284 - * parameter does not matter for this controller. 1285 - */ 1286 - int gpio = chip->base + offset; 1287 - int bank = chip->base / chip->ngpio; 1288 - 1289 - dev_dbg(chip->dev, "%s:%d pio%c%d(%d)\n", __func__, __LINE__, 1290 - 'A' + bank, offset, gpio); 1291 - 1292 - return pinctrl_request_gpio(gpio); 1293 - } 1294 - 1295 - static void at91_gpio_free(struct gpio_chip *chip, unsigned offset) 1296 - { 1297 - int gpio = chip->base + offset; 1298 - 1299 - pinctrl_free_gpio(gpio); 1300 - } 1301 - 1302 1280 static int at91_gpio_get_direction(struct gpio_chip *chip, unsigned offset) 1303 1281 { 1304 1282 struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip); ··· 1662 1684 1663 1685 /* This structure is replicated for each GPIO block allocated at probe time */ 1664 1686 static struct gpio_chip at91_gpio_template = { 1665 - .request = at91_gpio_request, 1666 - .free = at91_gpio_free, 1687 + .request = gpiochip_generic_request, 1688 + .free = gpiochip_generic_free, 1667 1689 .get_direction = at91_gpio_get_direction, 1668 1690 .direction_input = at91_gpio_direction_input, 1669 1691 .get = at91_gpio_get,
+2 -20
drivers/pinctrl/pinctrl-coh901.c
··· 217 217 return container_of(chip, struct u300_gpio, chip); 218 218 } 219 219 220 - static int u300_gpio_request(struct gpio_chip *chip, unsigned offset) 221 - { 222 - /* 223 - * Map back to global GPIO space and request muxing, the direction 224 - * parameter does not matter for this controller. 225 - */ 226 - int gpio = chip->base + offset; 227 - 228 - return pinctrl_request_gpio(gpio); 229 - } 230 - 231 - static void u300_gpio_free(struct gpio_chip *chip, unsigned offset) 232 - { 233 - int gpio = chip->base + offset; 234 - 235 - pinctrl_free_gpio(gpio); 236 - } 237 - 238 220 static int u300_gpio_get(struct gpio_chip *chip, unsigned offset) 239 221 { 240 222 struct u300_gpio *gpio = to_u300_gpio(chip); ··· 399 417 static struct gpio_chip u300_gpio_chip = { 400 418 .label = "u300-gpio-chip", 401 419 .owner = THIS_MODULE, 402 - .request = u300_gpio_request, 403 - .free = u300_gpio_free, 420 + .request = gpiochip_generic_request, 421 + .free = gpiochip_generic_free, 404 422 .get = u300_gpio_get, 405 423 .set = u300_gpio_set, 406 424 .direction_input = u300_gpio_direction_input,
+2 -12
drivers/pinctrl/pinctrl-digicolor.c
··· 169 169 .gpio_request_enable = dc_pmx_request_gpio, 170 170 }; 171 171 172 - static int dc_gpio_request(struct gpio_chip *chip, unsigned gpio) 173 - { 174 - return pinctrl_request_gpio(chip->base + gpio); 175 - } 176 - 177 - static void dc_gpio_free(struct gpio_chip *chip, unsigned gpio) 178 - { 179 - pinctrl_free_gpio(chip->base + gpio); 180 - } 181 - 182 172 static int dc_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) 183 173 { 184 174 struct dc_pinmap *pmap = container_of(chip, struct dc_pinmap, chip); ··· 245 255 246 256 chip->label = DRIVER_NAME; 247 257 chip->dev = pmap->dev; 248 - chip->request = dc_gpio_request; 249 - chip->free = dc_gpio_free; 258 + chip->request = gpiochip_generic_request; 259 + chip->free = gpiochip_generic_free; 250 260 chip->direction_input = dc_gpio_direction_input; 251 261 chip->direction_output = dc_gpio_direction_output; 252 262 chip->get = dc_gpio_get;
+2 -12
drivers/pinctrl/pinctrl-pistachio.c
··· 1171 1171 .confops = &pistachio_pinconf_ops, 1172 1172 }; 1173 1173 1174 - static int pistachio_gpio_request(struct gpio_chip *chip, unsigned offset) 1175 - { 1176 - return pinctrl_request_gpio(chip->base + offset); 1177 - } 1178 - 1179 - static void pistachio_gpio_free(struct gpio_chip *chip, unsigned offset) 1180 - { 1181 - pinctrl_free_gpio(chip->base + offset); 1182 - } 1183 - 1184 1174 static int pistachio_gpio_get_direction(struct gpio_chip *chip, unsigned offset) 1185 1175 { 1186 1176 struct pistachio_gpio_bank *bank = gc_to_bank(chip); ··· 1322 1332 .npins = _npins, \ 1323 1333 .gpio_chip = { \ 1324 1334 .label = "GPIO" #_bank, \ 1325 - .request = pistachio_gpio_request, \ 1326 - .free = pistachio_gpio_free, \ 1335 + .request = gpiochip_generic_request, \ 1336 + .free = gpiochip_generic_free, \ 1327 1337 .get_direction = pistachio_gpio_get_direction, \ 1328 1338 .direction_input = pistachio_gpio_direction_input, \ 1329 1339 .direction_output = pistachio_gpio_direction_output, \
+2 -12
drivers/pinctrl/pinctrl-rockchip.c
··· 1374 1374 * GPIO handling 1375 1375 */ 1376 1376 1377 - static int rockchip_gpio_request(struct gpio_chip *chip, unsigned offset) 1378 - { 1379 - return pinctrl_request_gpio(chip->base + offset); 1380 - } 1381 - 1382 - static void rockchip_gpio_free(struct gpio_chip *chip, unsigned offset) 1383 - { 1384 - pinctrl_free_gpio(chip->base + offset); 1385 - } 1386 - 1387 1377 static void rockchip_gpio_set(struct gpio_chip *gc, unsigned offset, int value) 1388 1378 { 1389 1379 struct rockchip_pin_bank *bank = gc_to_pin_bank(gc); ··· 1451 1461 } 1452 1462 1453 1463 static const struct gpio_chip rockchip_gpiolib_chip = { 1454 - .request = rockchip_gpio_request, 1455 - .free = rockchip_gpio_free, 1464 + .request = gpiochip_generic_request, 1465 + .free = gpiochip_generic_free, 1456 1466 .set = rockchip_gpio_set, 1457 1467 .get = rockchip_gpio_get, 1458 1468 .direction_input = rockchip_gpio_direction_input,
+2 -12
drivers/pinctrl/pinctrl-st.c
··· 742 742 } 743 743 } 744 744 745 - static int st_gpio_request(struct gpio_chip *chip, unsigned offset) 746 - { 747 - return pinctrl_request_gpio(chip->base + offset); 748 - } 749 - 750 - static void st_gpio_free(struct gpio_chip *chip, unsigned offset) 751 - { 752 - pinctrl_free_gpio(chip->base + offset); 753 - } 754 - 755 745 static int st_gpio_get(struct gpio_chip *chip, unsigned offset) 756 746 { 757 747 struct st_gpio_bank *bank = gpio_chip_to_bank(chip); ··· 1480 1490 } 1481 1491 1482 1492 static struct gpio_chip st_gpio_template = { 1483 - .request = st_gpio_request, 1484 - .free = st_gpio_free, 1493 + .request = gpiochip_generic_request, 1494 + .free = gpiochip_generic_free, 1485 1495 .get = st_gpio_get, 1486 1496 .set = st_gpio_set, 1487 1497 .direction_input = st_gpio_direction_input,
+2 -16
drivers/pinctrl/pinctrl-xway.c
··· 682 682 return 0; 683 683 } 684 684 685 - static int xway_gpio_req(struct gpio_chip *chip, unsigned offset) 686 - { 687 - int gpio = chip->base + offset; 688 - 689 - return pinctrl_request_gpio(gpio); 690 - } 691 - 692 - static void xway_gpio_free(struct gpio_chip *chip, unsigned offset) 693 - { 694 - int gpio = chip->base + offset; 695 - 696 - pinctrl_free_gpio(gpio); 697 - } 698 - 699 685 static struct gpio_chip xway_chip = { 700 686 .label = "gpio-xway", 701 687 .direction_input = xway_gpio_dir_in, 702 688 .direction_output = xway_gpio_dir_out, 703 689 .get = xway_gpio_get, 704 690 .set = xway_gpio_set, 705 - .request = xway_gpio_req, 706 - .free = xway_gpio_free, 691 + .request = gpiochip_generic_request, 692 + .free = gpiochip_generic_free, 707 693 .base = -1, 708 694 }; 709 695
+2 -14
drivers/pinctrl/qcom/pinctrl-msm.c
··· 458 458 spin_unlock_irqrestore(&pctrl->lock, flags); 459 459 } 460 460 461 - static int msm_gpio_request(struct gpio_chip *chip, unsigned offset) 462 - { 463 - int gpio = chip->base + offset; 464 - return pinctrl_request_gpio(gpio); 465 - } 466 - 467 - static void msm_gpio_free(struct gpio_chip *chip, unsigned offset) 468 - { 469 - int gpio = chip->base + offset; 470 - return pinctrl_free_gpio(gpio); 471 - } 472 - 473 461 #ifdef CONFIG_DEBUG_FS 474 462 #include <linux/seq_file.h> 475 463 ··· 515 527 .direction_output = msm_gpio_direction_output, 516 528 .get = msm_gpio_get, 517 529 .set = msm_gpio_set, 518 - .request = msm_gpio_request, 519 - .free = msm_gpio_free, 530 + .request = gpiochip_generic_request, 531 + .free = gpiochip_generic_free, 520 532 .dbg_show = msm_gpio_dbg_show, 521 533 }; 522 534
+2 -12
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
··· 546 546 pmic_gpio_config_set(state->ctrl, pin, &config, 1); 547 547 } 548 548 549 - static int pmic_gpio_request(struct gpio_chip *chip, unsigned base) 550 - { 551 - return pinctrl_request_gpio(chip->base + base); 552 - } 553 - 554 - static void pmic_gpio_free(struct gpio_chip *chip, unsigned base) 555 - { 556 - pinctrl_free_gpio(chip->base + base); 557 - } 558 - 559 549 static int pmic_gpio_of_xlate(struct gpio_chip *chip, 560 550 const struct of_phandle_args *gpio_desc, 561 551 u32 *flags) ··· 585 595 .direction_output = pmic_gpio_direction_output, 586 596 .get = pmic_gpio_get, 587 597 .set = pmic_gpio_set, 588 - .request = pmic_gpio_request, 589 - .free = pmic_gpio_free, 598 + .request = gpiochip_generic_request, 599 + .free = gpiochip_generic_free, 590 600 .of_xlate = pmic_gpio_of_xlate, 591 601 .to_irq = pmic_gpio_to_irq, 592 602 .dbg_show = pmic_gpio_dbg_show,
+2 -12
drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
··· 604 604 pmic_mpp_config_set(state->ctrl, pin, &config, 1); 605 605 } 606 606 607 - static int pmic_mpp_request(struct gpio_chip *chip, unsigned base) 608 - { 609 - return pinctrl_request_gpio(chip->base + base); 610 - } 611 - 612 - static void pmic_mpp_free(struct gpio_chip *chip, unsigned base) 613 - { 614 - pinctrl_free_gpio(chip->base + base); 615 - } 616 - 617 607 static int pmic_mpp_of_xlate(struct gpio_chip *chip, 618 608 const struct of_phandle_args *gpio_desc, 619 609 u32 *flags) ··· 643 653 .direction_output = pmic_mpp_direction_output, 644 654 .get = pmic_mpp_get, 645 655 .set = pmic_mpp_set, 646 - .request = pmic_mpp_request, 647 - .free = pmic_mpp_free, 656 + .request = gpiochip_generic_request, 657 + .free = gpiochip_generic_free, 648 658 .of_xlate = pmic_mpp_of_xlate, 649 659 .to_irq = pmic_mpp_to_irq, 650 660 .dbg_show = pmic_mpp_dbg_show,
+2 -12
drivers/pinctrl/samsung/pinctrl-samsung.c
··· 888 888 return 0; 889 889 } 890 890 891 - static int samsung_gpio_request(struct gpio_chip *chip, unsigned offset) 892 - { 893 - return pinctrl_request_gpio(chip->base + offset); 894 - } 895 - 896 - static void samsung_gpio_free(struct gpio_chip *chip, unsigned offset) 897 - { 898 - pinctrl_free_gpio(chip->base + offset); 899 - } 900 - 901 891 static const struct gpio_chip samsung_gpiolib_chip = { 902 - .request = samsung_gpio_request, 903 - .free = samsung_gpio_free, 892 + .request = gpiochip_generic_request, 893 + .free = gpiochip_generic_free, 904 894 .set = samsung_gpio_set, 905 895 .get = samsung_gpio_get, 906 896 .direction_input = samsung_gpio_direction_input,
+2 -12
drivers/pinctrl/sunxi/pinctrl-sunxi.c
··· 446 446 .gpio_set_direction = sunxi_pmx_gpio_set_direction, 447 447 }; 448 448 449 - static int sunxi_pinctrl_gpio_request(struct gpio_chip *chip, unsigned offset) 450 - { 451 - return pinctrl_request_gpio(chip->base + offset); 452 - } 453 - 454 - static void sunxi_pinctrl_gpio_free(struct gpio_chip *chip, unsigned offset) 455 - { 456 - pinctrl_free_gpio(chip->base + offset); 457 - } 458 - 459 449 static int sunxi_pinctrl_gpio_direction_input(struct gpio_chip *chip, 460 450 unsigned offset) 461 451 { ··· 946 956 947 957 last_pin = pctl->desc->pins[pctl->desc->npins - 1].pin.number; 948 958 pctl->chip->owner = THIS_MODULE; 949 - pctl->chip->request = sunxi_pinctrl_gpio_request, 950 - pctl->chip->free = sunxi_pinctrl_gpio_free, 959 + pctl->chip->request = gpiochip_generic_request, 960 + pctl->chip->free = gpiochip_generic_free, 951 961 pctl->chip->direction_input = sunxi_pinctrl_gpio_direction_input, 952 962 pctl->chip->direction_output = sunxi_pinctrl_gpio_direction_output, 953 963 pctl->chip->get = sunxi_pinctrl_gpio_get,
+2 -12
drivers/pinctrl/vt8500/pinctrl-wmt.c
··· 486 486 .confops = &wmt_pinconf_ops, 487 487 }; 488 488 489 - static int wmt_gpio_request(struct gpio_chip *chip, unsigned offset) 490 - { 491 - return pinctrl_request_gpio(chip->base + offset); 492 - } 493 - 494 - static void wmt_gpio_free(struct gpio_chip *chip, unsigned offset) 495 - { 496 - pinctrl_free_gpio(chip->base + offset); 497 - } 498 - 499 489 static int wmt_gpio_get_direction(struct gpio_chip *chip, unsigned offset) 500 490 { 501 491 struct wmt_pinctrl_data *data = dev_get_drvdata(chip->dev); ··· 550 560 static struct gpio_chip wmt_gpio_chip = { 551 561 .label = "gpio-wmt", 552 562 .owner = THIS_MODULE, 553 - .request = wmt_gpio_request, 554 - .free = wmt_gpio_free, 563 + .request = gpiochip_generic_request, 564 + .free = gpiochip_generic_free, 555 565 .get_direction = wmt_gpio_get_direction, 556 566 .direction_input = wmt_gpio_direction_input, 557 567 .direction_output = wmt_gpio_direction_output,