platform/x86: int3472: Drop unused gpio field from struct int3472_gpio_regulator
authorHans de Goede <hdegoede@redhat.com>
Thu, 17 Apr 2025 11:13:31 +0000 (13:13 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 24 Apr 2025 13:05:33 +0000 (16:05 +0300)
The gpio field in struct int3472_gpio_regulator is only briefly used to
store the GPIO in skl_int3472_register_regulator(). Instead just store
the GPIO directly into cfg.ena_gpiod an drop the gpio field.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: David Heidelberg <david@ixit.cz> # Dell Latitude 9440
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://lore.kernel.org/r/20250417111337.38142-4-hdegoede@redhat.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/int3472/clk_and_regulator.c
drivers/platform/x86/intel/int3472/common.h

index 40434591dd0be51d130a1ebe06e01c45bf8f33e9..5f6c66215f631ead89f2e6fefbae956ee3f54d25 100644 (file)
@@ -261,11 +261,9 @@ int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
                                                int3472->regulator.regulator_name,
                                                &int3472_gpio_regulator_ops);
 
-       int3472->regulator.gpio = gpio;
-
        cfg.dev = &int3472->adev->dev;
        cfg.init_data = &init_data;
-       cfg.ena_gpiod = int3472->regulator.gpio;
+       cfg.ena_gpiod = gpio;
 
        int3472->regulator.rdev = regulator_register(int3472->dev,
                                                     &int3472->regulator.rdesc,
index 72ef222629b627e1f62700ceacc26e70e04abc73..e0fa34be8a0784de0d8ed9645f4d8b90f655e852 100644 (file)
@@ -80,7 +80,6 @@ struct int3472_discrete_device {
                /* SUPPLY_MAP_COUNT * 2 to make room for second sensor mappings */
                struct regulator_consumer_supply supply_map[GPIO_REGULATOR_SUPPLY_MAP_COUNT * 2];
                char regulator_name[GPIO_REGULATOR_NAME_LENGTH];
-               struct gpio_desc *gpio;
                struct regulator_dev *rdev;
                struct regulator_desc rdesc;
        } regulator;