diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2012-01-19 21:56:50 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-01-19 21:56:50 +0100 |
commit | 282f445a779ed76fca9884fe377bf56a3088b208 (patch) | |
tree | d9abcf526baee0100672851e0a8894c19e762a39 /drivers/net/can/flexcan.c | |
parent | x86, tsc: Fix SMI induced variation in quick_pit_calibrate() (diff) | |
parent | uml: fix compile for x86-64 (diff) | |
download | linux-282f445a779ed76fca9884fe377bf56a3088b208.tar.xz linux-282f445a779ed76fca9884fe377bf56a3088b208.zip |
Merge remote-tracking branch 'linus/master' into x86/urgent
Diffstat (limited to 'drivers/net/can/flexcan.c')
-rw-r--r-- | drivers/net/can/flexcan.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index e02337953f41..7fd8089946fb 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -802,7 +802,7 @@ static int flexcan_open(struct net_device *dev) struct flexcan_priv *priv = netdev_priv(dev); int err; - clk_enable(priv->clk); + clk_prepare_enable(priv->clk); err = open_candev(dev); if (err) @@ -824,7 +824,7 @@ static int flexcan_open(struct net_device *dev) out_close: close_candev(dev); out: - clk_disable(priv->clk); + clk_disable_unprepare(priv->clk); return err; } @@ -838,7 +838,7 @@ static int flexcan_close(struct net_device *dev) flexcan_chip_stop(dev); free_irq(dev->irq, dev); - clk_disable(priv->clk); + clk_disable_unprepare(priv->clk); close_candev(dev); @@ -877,7 +877,7 @@ static int __devinit register_flexcandev(struct net_device *dev) struct flexcan_regs __iomem *regs = priv->base; u32 reg, err; - clk_enable(priv->clk); + clk_prepare_enable(priv->clk); /* select "bus clock", chip must be disabled */ flexcan_chip_disable(priv); @@ -911,7 +911,7 @@ static int __devinit register_flexcandev(struct net_device *dev) out: /* disable core and turn off clocks */ flexcan_chip_disable(priv); - clk_disable(priv->clk); + clk_disable_unprepare(priv->clk); return err; } @@ -1060,20 +1060,7 @@ static struct platform_driver flexcan_driver = { .remove = __devexit_p(flexcan_remove), }; -static int __init flexcan_init(void) -{ - pr_info("%s netdevice driver\n", DRV_NAME); - return platform_driver_register(&flexcan_driver); -} - -static void __exit flexcan_exit(void) -{ - platform_driver_unregister(&flexcan_driver); - pr_info("%s: driver removed\n", DRV_NAME); -} - -module_init(flexcan_init); -module_exit(flexcan_exit); +module_platform_driver(flexcan_driver); MODULE_AUTHOR("Sascha Hauer <kernel@pengutronix.de>, " "Marc Kleine-Budde <kernel@pengutronix.de>"); |