Commit 34db70b9 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by Kalle Valo

rt2x00: add copy of clk for soc devices

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: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: default avatarDaniel Golle <daniel@makrotopia.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent b3d75a81
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <linux/hrtimer.h> #include <linux/hrtimer.h>
#include <linux/average.h> #include <linux/average.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/clk.h>
#include <net/mac80211.h> #include <net/mac80211.h>
...@@ -1011,6 +1012,9 @@ struct rt2x00_dev { ...@@ -1011,6 +1012,9 @@ struct rt2x00_dev {
unsigned int extra_tx_headroom; unsigned int extra_tx_headroom;
struct usb_anchor *anchor; struct usb_anchor *anchor;
/* Clock for System On Chip devices. */
struct clk *clk;
}; };
struct rt2x00_bar_list_entry { struct rt2x00_bar_list_entry {
......
...@@ -92,6 +92,7 @@ int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops) ...@@ -92,6 +92,7 @@ int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops)
rt2x00dev->hw = hw; rt2x00dev->hw = hw;
rt2x00dev->irq = platform_get_irq(pdev, 0); rt2x00dev->irq = platform_get_irq(pdev, 0);
rt2x00dev->name = pdev->dev.driver->name; rt2x00dev->name = pdev->dev.driver->name;
rt2x00dev->clk = clk_get(&pdev->dev);
rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC); rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment