From: Hans de Goede <[email protected]>

platform/x86: int3472: Drop unused gpio field from struct int3472_gpio_regulator

upstream status: queued in platform-drivers-x86/for-next:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=for-next

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 <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Tested-by: David Heidelberg <[email protected]>  # Dell Latitude 9440
Reviewed-by: Sakari Ailus <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>

diff --git a/drivers/platform/x86/intel/int3472/clk_and_regulator.c 
b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
index blahblah..blahblah 100644
--- a/drivers/platform/x86/intel/int3472/clk_and_regulator.c
+++ b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
@@ -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,
diff --git a/drivers/platform/x86/intel/int3472/common.h 
b/drivers/platform/x86/intel/int3472/common.h
index blahblah..blahblah 100644
--- a/drivers/platform/x86/intel/int3472/common.h
+++ b/drivers/platform/x86/intel/int3472/common.h
@@ -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;

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3854

-- 
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to