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

pinctrl: remove unnecessary max pin number

This patch removes maxpin member in the pin control descriptor
because we don't need this value as we enumerate a pin space
using offset.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Chanho Park and committed by
Linus Walleij
0d2006bb 706e8520

-8
-1
drivers/pinctrl/core.c
··· 354 354 unsigned i, pin; 355 355 356 356 seq_printf(s, "registered pins: %d\n", pctldev->desc->npins); 357 - seq_printf(s, "max pin number: %d\n", pctldev->desc->maxpin); 358 357 359 358 /* The pin number can be retrived from the pin controller descriptor */ 360 359 for (i = 0; i < pctldev->desc->npins; i++) {
-1
drivers/pinctrl/pinctrl-sirf.c
··· 1086 1086 .name = DRIVER_NAME, 1087 1087 .pins = sirfsoc_pads, 1088 1088 .npins = ARRAY_SIZE(sirfsoc_pads), 1089 - .maxpin = SIRFSOC_NUM_PADS - 1, 1090 1089 .pctlops = &sirfsoc_pctrl_ops, 1091 1090 .pmxops = &sirfsoc_pinmux_ops, 1092 1091 .owner = THIS_MODULE,
-1
drivers/pinctrl/pinctrl-u300.c
··· 1048 1048 .name = DRIVER_NAME, 1049 1049 .pins = u300_pads, 1050 1050 .npins = ARRAY_SIZE(u300_pads), 1051 - .maxpin = U300_NUM_PADS-1, 1052 1051 .pctlops = &u300_pctrl_ops, 1053 1052 .pmxops = &u300_pmx_ops, 1054 1053 .owner = THIS_MODULE,
-5
include/linux/pinctrl/pinctrl.h
··· 92 92 * this pin controller 93 93 * @npins: number of descriptors in the array, usually just ARRAY_SIZE() 94 94 * of the pins field above 95 - * @maxpin: since pin spaces may be sparse, there can he "holes" in the 96 - * pin range, this attribute gives the maximum pin number in the 97 - * total range. This should not be lower than npins for example, 98 - * but may be equal to npins if you have no holes in the pin range. 99 95 * @pctlops: pin control operation vtable, to support global concepts like 100 96 * grouping of pins, this is optional. 101 97 * @pmxops: pinmux operations vtable, if you support pinmuxing in your driver ··· 103 107 const char *name; 104 108 struct pinctrl_pin_desc const *pins; 105 109 unsigned int npins; 106 - unsigned int maxpin; 107 110 struct pinctrl_ops *pctlops; 108 111 struct pinmux_ops *pmxops; 109 112 struct pinconf_ops *confops;