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

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: 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
f12a86a0 6a81c26f

+1 -13
+1 -8
drivers/usb/gadget/m66592-udc.c
··· 1583 1583 iounmap(m66592->reg); 1584 1584 free_irq(platform_get_irq(pdev, 0), m66592); 1585 1585 m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req); 1586 - #ifdef CONFIG_HAVE_CLK 1587 1586 if (m66592->pdata->on_chip) { 1588 1587 clk_disable(m66592->clk); 1589 1588 clk_put(m66592->clk); 1590 1589 } 1591 - #endif 1592 1590 kfree(m66592); 1593 1591 return 0; 1594 1592 } ··· 1600 1602 struct resource *res, *ires; 1601 1603 void __iomem *reg = NULL; 1602 1604 struct m66592 *m66592 = NULL; 1603 - #ifdef CONFIG_HAVE_CLK 1604 1605 char clk_name[8]; 1605 - #endif 1606 1606 int ret = 0; 1607 1607 int i; 1608 1608 ··· 1667 1671 goto clean_up; 1668 1672 } 1669 1673 1670 - #ifdef CONFIG_HAVE_CLK 1671 1674 if (m66592->pdata->on_chip) { 1672 1675 snprintf(clk_name, sizeof(clk_name), "usbf%d", pdev->id); 1673 1676 m66592->clk = clk_get(&pdev->dev, clk_name); ··· 1678 1683 } 1679 1684 clk_enable(m66592->clk); 1680 1685 } 1681 - #endif 1686 + 1682 1687 INIT_LIST_HEAD(&m66592->gadget.ep_list); 1683 1688 m66592->gadget.ep0 = &m66592->ep[0].ep; 1684 1689 INIT_LIST_HEAD(&m66592->gadget.ep0->ep_list); ··· 1726 1731 m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req); 1727 1732 1728 1733 clean_up3: 1729 - #ifdef CONFIG_HAVE_CLK 1730 1734 if (m66592->pdata->on_chip) { 1731 1735 clk_disable(m66592->clk); 1732 1736 clk_put(m66592->clk); 1733 1737 } 1734 1738 clean_up2: 1735 - #endif 1736 1739 free_irq(ires->start, m66592); 1737 1740 clean_up: 1738 1741 if (m66592) {
-5
drivers/usb/gadget/m66592-udc.h
··· 13 13 #ifndef __M66592_UDC_H__ 14 14 #define __M66592_UDC_H__ 15 15 16 - #ifdef CONFIG_HAVE_CLK 17 16 #include <linux/clk.h> 18 - #endif 19 - 20 17 #include <linux/usb/m66592.h> 21 18 22 19 #define M66592_SYSCFG 0x00 ··· 465 468 struct m66592 { 466 469 spinlock_t lock; 467 470 void __iomem *reg; 468 - #ifdef CONFIG_HAVE_CLK 469 471 struct clk *clk; 470 - #endif 471 472 struct m66592_platdata *pdata; 472 473 unsigned long irq_trigger; 473 474