Skip to content

Commit da3a88e

Browse files
Bartosz GolaszewskiLinus Walleij
authored andcommitted
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>
1 parent 8c2467d commit da3a88e

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1836,7 +1836,7 @@ static int npcm7xx_gpio_of(struct npcm7xx_pinctrl *pctrl)
18361836
if (!pctrl->gpio_bank[id].base)
18371837
return -EINVAL;
18381838

1839-
config = (typeof(config)){
1839+
config = (struct gpio_generic_chip_config) {
18401840
.dev = dev,
18411841
.sz = 4,
18421842
.dat = pctrl->gpio_bank[id].base + NPCM7XX_GP_N_DIN,

drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2329,7 +2329,7 @@ static int npcm8xx_gpio_fw(struct npcm8xx_pinctrl *pctrl)
23292329
if (!pctrl->gpio_bank[id].base)
23302330
return dev_err_probe(dev, -ENXIO, "fwnode_iomap id %d failed\n", id);
23312331

2332-
config = (typeof(config)){
2332+
config = (struct gpio_generic_chip_config) {
23332333
.dev = dev,
23342334
.sz = 4,
23352335
.dat = pctrl->gpio_bank[id].base + NPCM8XX_GP_N_DIN,

drivers/pinctrl/nuvoton/pinctrl-wpcm450.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ static int wpcm450_gpio_register(struct platform_device *pdev,
10641064
flags = BGPIOF_NO_OUTPUT;
10651065
}
10661066

1067-
config = (typeof(config)){
1067+
config = (struct gpio_generic_chip_config) {
10681068
.dev = dev,
10691069
.sz = 4,
10701070
.dat = dat,

drivers/pinctrl/pinctrl-equilibrium.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static int gpiolib_reg(struct eqbr_pinctrl_drv_data *drvdata)
241241
}
242242
raw_spin_lock_init(&gctrl->lock);
243243

244-
config = (typeof(config)){
244+
config = (struct gpio_generic_chip_config) {
245245
.dev = dev,
246246
.sz = gctrl->bank->nr_pins / 8,
247247
.dat = gctrl->membase + GPIO_IN,

drivers/pinctrl/stm32/pinctrl-stm32-hdp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ static int stm32_hdp_probe(struct platform_device *pdev)
642642
hdp->gpio_chip.gc.can_sleep = true;
643643
hdp->gpio_chip.gc.names = stm32_hdp_pins_group;
644644

645-
config = (typeof(config)){
645+
config = (struct gpio_generic_chip_config) {
646646
.dev = dev,
647647
.sz = 4,
648648
.dat = hdp->base + HDP_GPOVAL,

0 commit comments

Comments
 (0)