Commit f12a86a0 authored by Viresh Kumar's avatar Viresh Kumar Committed by Linus Torvalds

gadget/m66592: remove conditional compilation of clk code

With addition of dummy clk_*() calls for non CONFIG_HAVE_CLK cases in
clk.h, there is no need to have clk code enclosed in #ifdef
CONFIG_HAVE_CLK, #endif macros.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@st.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: viresh kumar <viresh.linux@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6a81c26f
...@@ -1583,12 +1583,10 @@ static int __exit m66592_remove(struct platform_device *pdev) ...@@ -1583,12 +1583,10 @@ static int __exit m66592_remove(struct platform_device *pdev)
iounmap(m66592->reg); iounmap(m66592->reg);
free_irq(platform_get_irq(pdev, 0), m66592); free_irq(platform_get_irq(pdev, 0), m66592);
m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req); m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
#ifdef CONFIG_HAVE_CLK
if (m66592->pdata->on_chip) { if (m66592->pdata->on_chip) {
clk_disable(m66592->clk); clk_disable(m66592->clk);
clk_put(m66592->clk); clk_put(m66592->clk);
} }
#endif
kfree(m66592); kfree(m66592);
return 0; return 0;
} }
...@@ -1602,9 +1600,7 @@ static int __init m66592_probe(struct platform_device *pdev) ...@@ -1602,9 +1600,7 @@ static int __init m66592_probe(struct platform_device *pdev)
struct resource *res, *ires; struct resource *res, *ires;
void __iomem *reg = NULL; void __iomem *reg = NULL;
struct m66592 *m66592 = NULL; struct m66592 *m66592 = NULL;
#ifdef CONFIG_HAVE_CLK
char clk_name[8]; char clk_name[8];
#endif
int ret = 0; int ret = 0;
int i; int i;
...@@ -1671,7 +1667,6 @@ static int __init m66592_probe(struct platform_device *pdev) ...@@ -1671,7 +1667,6 @@ static int __init m66592_probe(struct platform_device *pdev)
goto clean_up; goto clean_up;
} }
#ifdef CONFIG_HAVE_CLK
if (m66592->pdata->on_chip) { if (m66592->pdata->on_chip) {
snprintf(clk_name, sizeof(clk_name), "usbf%d", pdev->id); snprintf(clk_name, sizeof(clk_name), "usbf%d", pdev->id);
m66592->clk = clk_get(&pdev->dev, clk_name); m66592->clk = clk_get(&pdev->dev, clk_name);
...@@ -1683,7 +1678,7 @@ static int __init m66592_probe(struct platform_device *pdev) ...@@ -1683,7 +1678,7 @@ static int __init m66592_probe(struct platform_device *pdev)
} }
clk_enable(m66592->clk); clk_enable(m66592->clk);
} }
#endif
INIT_LIST_HEAD(&m66592->gadget.ep_list); INIT_LIST_HEAD(&m66592->gadget.ep_list);
m66592->gadget.ep0 = &m66592->ep[0].ep; m66592->gadget.ep0 = &m66592->ep[0].ep;
INIT_LIST_HEAD(&m66592->gadget.ep0->ep_list); INIT_LIST_HEAD(&m66592->gadget.ep0->ep_list);
...@@ -1731,13 +1726,11 @@ static int __init m66592_probe(struct platform_device *pdev) ...@@ -1731,13 +1726,11 @@ static int __init m66592_probe(struct platform_device *pdev)
m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req); m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
clean_up3: clean_up3:
#ifdef CONFIG_HAVE_CLK
if (m66592->pdata->on_chip) { if (m66592->pdata->on_chip) {
clk_disable(m66592->clk); clk_disable(m66592->clk);
clk_put(m66592->clk); clk_put(m66592->clk);
} }
clean_up2: clean_up2:
#endif
free_irq(ires->start, m66592); free_irq(ires->start, m66592);
clean_up: clean_up:
if (m66592) { if (m66592) {
......
...@@ -13,10 +13,7 @@ ...@@ -13,10 +13,7 @@
#ifndef __M66592_UDC_H__ #ifndef __M66592_UDC_H__
#define __M66592_UDC_H__ #define __M66592_UDC_H__
#ifdef CONFIG_HAVE_CLK
#include <linux/clk.h> #include <linux/clk.h>
#endif
#include <linux/usb/m66592.h> #include <linux/usb/m66592.h>
#define M66592_SYSCFG 0x00 #define M66592_SYSCFG 0x00
...@@ -468,9 +465,7 @@ struct m66592_ep { ...@@ -468,9 +465,7 @@ struct m66592_ep {
struct m66592 { struct m66592 {
spinlock_t lock; spinlock_t lock;
void __iomem *reg; void __iomem *reg;
#ifdef CONFIG_HAVE_CLK
struct clk *clk; struct clk *clk;
#endif
struct m66592_platdata *pdata; struct m66592_platdata *pdata;
unsigned long irq_trigger; unsigned long irq_trigger;
......
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