pinctrl: use more common syntax for compound literals

The (typeof(foo)) construct is unusual in the kernel, use a more typical
syntax by explicitly spelling out the type.

Link: https://lore.kernel.org/all/20250909-gpio-mmio-gpio-conv-part4-v1-13-9f723dc3524a@linaro.org/
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Bartosz Golaszewski
2025-09-10 09:25:46 +02:00
committed by Linus Walleij
parent 8c2467dea3
commit da3a88e965
5 changed files with 5 additions and 5 deletions

View File

@@ -1836,7 +1836,7 @@ static int npcm7xx_gpio_of(struct npcm7xx_pinctrl *pctrl)
if (!pctrl->gpio_bank[id].base)
return -EINVAL;
config = (typeof(config)){
config = (struct gpio_generic_chip_config) {
.dev = dev,
.sz = 4,
.dat = pctrl->gpio_bank[id].base + NPCM7XX_GP_N_DIN,

View File

@@ -2329,7 +2329,7 @@ static int npcm8xx_gpio_fw(struct npcm8xx_pinctrl *pctrl)
if (!pctrl->gpio_bank[id].base)
return dev_err_probe(dev, -ENXIO, "fwnode_iomap id %d failed\n", id);
config = (typeof(config)){
config = (struct gpio_generic_chip_config) {
.dev = dev,
.sz = 4,
.dat = pctrl->gpio_bank[id].base + NPCM8XX_GP_N_DIN,

View File

@@ -1064,7 +1064,7 @@ static int wpcm450_gpio_register(struct platform_device *pdev,
flags = BGPIOF_NO_OUTPUT;
}
config = (typeof(config)){
config = (struct gpio_generic_chip_config) {
.dev = dev,
.sz = 4,
.dat = dat,

View File

@@ -241,7 +241,7 @@ static int gpiolib_reg(struct eqbr_pinctrl_drv_data *drvdata)
}
raw_spin_lock_init(&gctrl->lock);
config = (typeof(config)){
config = (struct gpio_generic_chip_config) {
.dev = dev,
.sz = gctrl->bank->nr_pins / 8,
.dat = gctrl->membase + GPIO_IN,

View File

@@ -642,7 +642,7 @@ static int stm32_hdp_probe(struct platform_device *pdev)
hdp->gpio_chip.gc.can_sleep = true;
hdp->gpio_chip.gc.names = stm32_hdp_pins_group;
config = (typeof(config)){
config = (struct gpio_generic_chip_config) {
.dev = dev,
.sz = 4,
.dat = hdp->base + HDP_GPOVAL,