Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gadget/r8a66597: 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: Viresh 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Viresh Kumar and committed by
Linus Torvalds
569a50da f12a86a0

+3 -13
+3 -8
drivers/usb/gadget/r8a66597-udc.c
··· 1831 1831 iounmap(r8a66597->sudmac_reg); 1832 1832 free_irq(platform_get_irq(pdev, 0), r8a66597); 1833 1833 r8a66597_free_request(&r8a66597->ep[0].ep, r8a66597->ep0_req); 1834 - #ifdef CONFIG_HAVE_CLK 1834 + 1835 1835 if (r8a66597->pdata->on_chip) { 1836 1836 clk_disable(r8a66597->clk); 1837 1837 clk_put(r8a66597->clk); 1838 1838 } 1839 - #endif 1839 + 1840 1840 device_unregister(&r8a66597->gadget.dev); 1841 1841 kfree(r8a66597); 1842 1842 return 0; ··· 1868 1868 1869 1869 static int __init r8a66597_probe(struct platform_device *pdev) 1870 1870 { 1871 - #ifdef CONFIG_HAVE_CLK 1872 1871 char clk_name[8]; 1873 - #endif 1874 1872 struct resource *res, *ires; 1875 1873 int irq; 1876 1874 void __iomem *reg = NULL; ··· 1932 1934 r8a66597->timer.data = (unsigned long)r8a66597; 1933 1935 r8a66597->reg = reg; 1934 1936 1935 - #ifdef CONFIG_HAVE_CLK 1936 1937 if (r8a66597->pdata->on_chip) { 1937 1938 snprintf(clk_name, sizeof(clk_name), "usb%d", pdev->id); 1938 1939 r8a66597->clk = clk_get(&pdev->dev, clk_name); ··· 1943 1946 } 1944 1947 clk_enable(r8a66597->clk); 1945 1948 } 1946 - #endif 1949 + 1947 1950 if (r8a66597->pdata->sudmac) { 1948 1951 ret = r8a66597_sudmac_ioremap(r8a66597, pdev); 1949 1952 if (ret < 0) ··· 2003 2006 clean_up3: 2004 2007 free_irq(irq, r8a66597); 2005 2008 clean_up2: 2006 - #ifdef CONFIG_HAVE_CLK 2007 2009 if (r8a66597->pdata->on_chip) { 2008 2010 clk_disable(r8a66597->clk); 2009 2011 clk_put(r8a66597->clk); 2010 2012 } 2011 2013 clean_up_dev: 2012 - #endif 2013 2014 device_unregister(&r8a66597->gadget.dev); 2014 2015 clean_up: 2015 2016 if (r8a66597) {
-5
drivers/usb/gadget/r8a66597-udc.h
··· 13 13 #ifndef __R8A66597_H__ 14 14 #define __R8A66597_H__ 15 15 16 - #ifdef CONFIG_HAVE_CLK 17 16 #include <linux/clk.h> 18 - #endif 19 - 20 17 #include <linux/usb/r8a66597.h> 21 18 22 19 #define R8A66597_MAX_SAMPLING 10 ··· 89 92 void __iomem *reg; 90 93 void __iomem *sudmac_reg; 91 94 92 - #ifdef CONFIG_HAVE_CLK 93 95 struct clk *clk; 94 - #endif 95 96 struct r8a66597_platdata *pdata; 96 97 97 98 struct usb_gadget gadget;