Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit c4aff1d

Browse files
author
Wolfram Sang
committed
Merge tag 'i2c-host-6.10-pt2' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current
Removed the SPD class of i2c devices from the device core. Additionally, a cleanup in the Synquacer code removes the pclk from the global structure, as it is used only in the probe. Therefore, it is now declared locally.
2 parents c3f38fa + e61bcf4 commit c4aff1d

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

drivers/i2c/busses/i2c-synquacer.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ struct synquacer_i2c {
138138
int irq;
139139
struct device *dev;
140140
void __iomem *base;
141-
struct clk *pclk;
142141
u32 pclkrate;
143142
u32 speed_khz;
144143
u32 timeout_ms;
@@ -535,6 +534,7 @@ static const struct i2c_adapter synquacer_i2c_ops = {
535534
static int synquacer_i2c_probe(struct platform_device *pdev)
536535
{
537536
struct synquacer_i2c *i2c;
537+
struct clk *pclk;
538538
u32 bus_speed;
539539
int ret;
540540

@@ -550,13 +550,12 @@ static int synquacer_i2c_probe(struct platform_device *pdev)
550550
device_property_read_u32(&pdev->dev, "socionext,pclk-rate",
551551
&i2c->pclkrate);
552552

553-
i2c->pclk = devm_clk_get_enabled(&pdev->dev, "pclk");
554-
if (IS_ERR(i2c->pclk))
555-
return dev_err_probe(&pdev->dev, PTR_ERR(i2c->pclk),
553+
pclk = devm_clk_get_enabled(&pdev->dev, "pclk");
554+
if (IS_ERR(pclk))
555+
return dev_err_probe(&pdev->dev, PTR_ERR(pclk),
556556
"failed to get and enable clock\n");
557557

558-
dev_dbg(&pdev->dev, "clock source %p\n", i2c->pclk);
559-
i2c->pclkrate = clk_get_rate(i2c->pclk);
558+
i2c->pclkrate = clk_get_rate(pclk);
560559

561560
if (i2c->pclkrate < SYNQUACER_I2C_MIN_CLK_RATE ||
562561
i2c->pclkrate > SYNQUACER_I2C_MAX_CLK_RATE)

include/linux/i2c.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,6 @@ static inline void i2c_mark_adapter_resumed(struct i2c_adapter *adap)
852852

853853
/* i2c adapter classes (bitmask) */
854854
#define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */
855-
#define I2C_CLASS_SPD (1<<7) /* Memory modules */
856855
/* Warn users that the adapter doesn't support classes anymore */
857856
#define I2C_CLASS_DEPRECATED (1<<8)
858857

0 commit comments

Comments
 (0)