diff options
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/fsl-rngc.c | 48 |
1 files changed, 3 insertions, 45 deletions
diff --git a/drivers/char/hw_random/fsl-rngc.c b/drivers/char/hw_random/fsl-rngc.c index 9e788f97c4d8..9bf78e846fa0 100644 --- a/drivers/char/hw_random/fsl-rngc.c +++ b/drivers/char/hw_random/fsl-rngc.c @@ -1,7 +1,7 @@ /* * RNG driver for Freescale RNGC * - * Copyright (C) 2008-2010 Freescale Semiconductor, Inc. + * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -42,6 +42,7 @@ #include <linux/interrupt.h> #include <linux/hw_random.h> #include <linux/io.h> +#include <asm/hardware.h> #define RNGC_VERSION_MAJOR3 3 @@ -291,7 +292,7 @@ static int __init fsl_rngc_probe(struct platform_device *pdev) if (rng_dev) return -EBUSY; - clk = clk_get(&pdev->dev, "rng_clk"); + clk = clk_get(NULL, "rng_clk"); if (IS_ERR(clk)) { dev_err(&pdev->dev, "Can not get rng_clk\n"); @@ -333,17 +334,9 @@ static int __init fsl_rngc_probe(struct platform_device *pdev) static int __exit fsl_rngc_remove(struct platform_device *pdev) { - struct clk *clk; struct resource *mem = dev_get_drvdata(&pdev->dev); void __iomem *rngc_base = (void __iomem *)fsl_rngc.priv; - clk = clk_get(&pdev->dev, "rng_clk"); - - if (IS_ERR(clk)) - dev_err(&pdev->dev, "Can not get rng_clk\n"); - else - clk_disable(clk); - hwrng_unregister(&fsl_rngc); release_resource(mem); @@ -353,47 +346,12 @@ static int __exit fsl_rngc_remove(struct platform_device *pdev) return 0; } -static int fsl_rngc_suspend(struct platform_device *pdev, - pm_message_t state) -{ -#ifdef CONFIG_PM - struct clk *clk = clk_get(&pdev->dev, "rng_clk"); - - if (IS_ERR(clk)) { - dev_err(&pdev->dev, "Can not get rng_clk\n"); - return PTR_ERR(clk); - } - - clk_disable(clk); -#endif - - return 0; -} - -static int fsl_rngc_resume(struct platform_device *pdev) -{ -#ifdef CONFIG_PM - struct clk *clk = clk_get(&pdev->dev, "rng_clk"); - - if (IS_ERR(clk)) { - dev_err(&pdev->dev, "Can not get rng_clk\n"); - return PTR_ERR(clk); - } - - clk_enable(clk); -#endif - - return 0; -} - static struct platform_driver fsl_rngc_driver = { .driver = { .name = "fsl_rngc", .owner = THIS_MODULE, }, .remove = __exit_p(fsl_rngc_remove), - .suspend = fsl_rngc_suspend, - .resume = fsl_rngc_resume, }; static int __init mod_init(void) |