Search Linux Wireless

Re: [PATCH v4 1/3] rt2x00: add copy of clk for soc devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017-01-20 14:28, Stanislaw Gruszka wrote:
> Since clk_get() is not trivial add copy of clk pointer to rt2x00dev
> for System On Chip devices and initialize it on probe routine.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
> ---
>  drivers/net/wireless/ralink/rt2x00/rt2x00.h    | 4 ++++
>  drivers/net/wireless/ralink/rt2x00/rt2x00soc.c | 1 +
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
> index bea7ac3..b59e721 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
> @@ -39,6 +39,7 @@
>  #include <linux/hrtimer.h>
>  #include <linux/average.h>
>  #include <linux/usb.h>
> +#include <linux/clk.h>
>  
>  #include <net/mac80211.h>
>  
> @@ -1011,6 +1012,9 @@ struct rt2x00_dev {
>  	unsigned int extra_tx_headroom;
>  
>  	struct usb_anchor *anchor;
> +
> +	/* Clock for System On Chip devices. */
> +	struct clk *clk;
>  };
>  
>  struct rt2x00_bar_list_entry {
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
> index 69a0cda..362f9d3 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
> @@ -92,6 +92,7 @@ int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops)
>  	rt2x00dev->hw = hw;
>  	rt2x00dev->irq = platform_get_irq(pdev, 0);
>  	rt2x00dev->name = pdev->dev.driver->name;
> +	rt2x00dev->clk = clk_get(&pdev->dev);
This looks broken, clk_get takes two parameters, not just one.

- Felix



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux