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

Commit e6722ea

Browse files
tititiou36Andi Shyti
authored andcommitted
i2c: synquacer: Remove a clk reference from struct synquacer_i2c
'pclk' is only used locally in the probe. Remove it from the 'synquacer_i2c' structure. Also remove a useless debug message. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
1 parent c760b37 commit e6722ea

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
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)

0 commit comments

Comments
 (0)