Skip to content

Commit 628c248

Browse files
andy-shevAndi Shyti
authored andcommitted
i2c: designware: Rename dw_i2c_of_configure() -> i2c_dw_of_configure()
For the sake of consistency, rename dw_i2c_of_configure() and change its parameter to be aligned with the i2c_dw_acpi_configure(). Reviewed-by: Andi Shyti <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Acked-by: Jarkko Nikula <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Andi Shyti <[email protected]>
1 parent c1a5e6f commit 628c248

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/i2c/busses/i2c-designware-platdrv.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,10 @@ static int mscc_twi_set_sda_hold_time(struct dw_i2c_dev *dev)
110110
return 0;
111111
}
112112

113-
static void dw_i2c_of_configure(struct platform_device *pdev)
113+
static void i2c_dw_of_configure(struct device *device)
114114
{
115-
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
115+
struct platform_device *pdev = to_platform_device(device);
116+
struct dw_i2c_dev *dev = dev_get_drvdata(device);
116117

117118
switch (dev->flags & MODEL_MASK) {
118119
case MODEL_MSCC_OCELOT:
@@ -130,7 +131,7 @@ static int bt1_i2c_request_regs(struct dw_i2c_dev *dev)
130131
return -ENODEV;
131132
}
132133

133-
static inline void dw_i2c_of_configure(struct platform_device *pdev)
134+
static inline void i2c_dw_of_configure(struct device *device)
134135
{
135136
}
136137
#endif
@@ -276,7 +277,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
276277
i2c_dw_adjust_bus_speed(dev);
277278

278279
if (pdev->dev.of_node)
279-
dw_i2c_of_configure(pdev);
280+
i2c_dw_of_configure(&pdev->dev);
280281

281282
if (has_acpi_companion(&pdev->dev))
282283
i2c_dw_acpi_configure(&pdev->dev);

0 commit comments

Comments
 (0)