diff mbox series

[4/4] spi: mt7621: Remove 'clk' from 'struct mt7621_spi'

Message ID 76ed0ef91479498b9a2d5ef539f80851cffdb4ea.1661599671.git.christophe.jaillet@wanadoo.fr
State Accepted
Commit 4a5cc683543f5f6ed586944095c65cb4da4b9273
Headers show
Series spi: mt7621: Fix an erroneous message + clean-ups | expand

Commit Message

Christophe JAILLET Aug. 27, 2022, 11:42 a.m. UTC
The 'clk' field in 'struct mt7621_spi' is useless, remove it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/spi/spi-mt7621.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Matthias Brugger Aug. 29, 2022, 11:18 a.m. UTC | #1
On 27/08/2022 13:42, Christophe JAILLET wrote:
> The 'clk' field in 'struct mt7621_spi' is useless, remove it.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

IMHO should be part of patch 2/4.

Regards,
Matthias

> ---
>   drivers/spi/spi-mt7621.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-mt7621.c b/drivers/spi/spi-mt7621.c
> index 114f98dcae5e..c4cc8e2f85e2 100644
> --- a/drivers/spi/spi-mt7621.c
> +++ b/drivers/spi/spi-mt7621.c
> @@ -55,7 +55,6 @@ struct mt7621_spi {
>   	void __iomem		*base;
>   	unsigned int		sys_freq;
>   	unsigned int		speed;
> -	struct clk		*clk;
>   	int			pending_write;
>   };
>   
> @@ -361,9 +360,8 @@ static int mt7621_spi_probe(struct platform_device *pdev)
>   
>   	rs = spi_controller_get_devdata(master);
>   	rs->base = base;
> -	rs->clk = clk;
>   	rs->master = master;
> -	rs->sys_freq = clk_get_rate(rs->clk);
> +	rs->sys_freq = clk_get_rate(clk);
>   	rs->pending_write = 0;
>   	dev_info(&pdev->dev, "sys_freq: %u\n", rs->sys_freq);
>
Christophe JAILLET Aug. 29, 2022, 5:23 p.m. UTC | #2
Le 29/08/2022 à 13:18, Matthias Brugger a écrit :
> 
> 
> On 27/08/2022 13:42, Christophe JAILLET wrote:
>> The 'clk' field in 'struct mt7621_spi' is useless, remove it.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> IMHO should be part of patch 2/4.

Ok, I'll send a v2 of the serie to merge patch 2 & 4.

CJ

> 
> Regards,
> Matthias
> 
>> ---
>>   drivers/spi/spi-mt7621.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/spi/spi-mt7621.c b/drivers/spi/spi-mt7621.c
>> index 114f98dcae5e..c4cc8e2f85e2 100644
>> --- a/drivers/spi/spi-mt7621.c
>> +++ b/drivers/spi/spi-mt7621.c
>> @@ -55,7 +55,6 @@ struct mt7621_spi {
>>       void __iomem        *base;
>>       unsigned int        sys_freq;
>>       unsigned int        speed;
>> -    struct clk        *clk;
>>       int            pending_write;
>>   };
>> @@ -361,9 +360,8 @@ static int mt7621_spi_probe(struct platform_device 
>> *pdev)
>>       rs = spi_controller_get_devdata(master);
>>       rs->base = base;
>> -    rs->clk = clk;
>>       rs->master = master;
>> -    rs->sys_freq = clk_get_rate(rs->clk);
>> +    rs->sys_freq = clk_get_rate(clk);
>>       rs->pending_write = 0;
>>       dev_info(&pdev->dev, "sys_freq: %u\n", rs->sys_freq);
diff mbox series

Patch

diff --git a/drivers/spi/spi-mt7621.c b/drivers/spi/spi-mt7621.c
index 114f98dcae5e..c4cc8e2f85e2 100644
--- a/drivers/spi/spi-mt7621.c
+++ b/drivers/spi/spi-mt7621.c
@@ -55,7 +55,6 @@  struct mt7621_spi {
 	void __iomem		*base;
 	unsigned int		sys_freq;
 	unsigned int		speed;
-	struct clk		*clk;
 	int			pending_write;
 };
 
@@ -361,9 +360,8 @@  static int mt7621_spi_probe(struct platform_device *pdev)
 
 	rs = spi_controller_get_devdata(master);
 	rs->base = base;
-	rs->clk = clk;
 	rs->master = master;
-	rs->sys_freq = clk_get_rate(rs->clk);
+	rs->sys_freq = clk_get_rate(clk);
 	rs->pending_write = 0;
 	dev_info(&pdev->dev, "sys_freq: %u\n", rs->sys_freq);