diff mbox series

[3/8] platform/x86: int3472: Drop unused gpio field from struct int3472_gpio_regulator

Message ID 20250325161340.342192-4-hdegoede@redhat.com (mailing list archive)
State Changes Requested, archived
Headers show
Series platform/x86: int3472: Add handshake pin support | expand

Commit Message

Hans de Goede March 25, 2025, 4:13 p.m. UTC
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.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/platform/x86/intel/int3472/clk_and_regulator.c | 4 +---
 drivers/platform/x86/intel/int3472/common.h            | 1 -
 2 files changed, 1 insertion(+), 4 deletions(-)

Comments

Andy Shevchenko March 25, 2025, 4:47 p.m. UTC | #1
On Tue, Mar 25, 2025 at 05:13:35PM +0100, Hans de Goede wrote:
> The gpio field in struct int3472_gpio_regulator is only briefly used to

(no need to change anything on the firs line :)

> store the gpio in skl_int3472_register_regulator() instead just store

GPIO

' instead' --> '. Instead' (otherwise it's a tautology)

> the gpio directly into cfg.ena_gpiod an drop the gpio field.

GPIO (only the first occurrence)

Reviewed-by: Andy Shevchenko <andy@kernel.org>
diff mbox series

Patch

diff --git a/drivers/platform/x86/intel/int3472/clk_and_regulator.c b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
index 40434591dd0b..5f6c66215f63 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 72ef222629b6..e0fa34be8a07 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;