aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/m66592-udc.c9
-rw-r--r--drivers/usb/gadget/m66592-udc.h5
2 files changed, 1 insertions, 13 deletions
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c
index 8981fbb5748c..cf6bd626f3fe 100644
--- a/drivers/usb/gadget/m66592-udc.c
+++ b/drivers/usb/gadget/m66592-udc.c
@@ -1583,12 +1583,10 @@ static int __exit m66592_remove(struct platform_device *pdev)
1583 iounmap(m66592->reg); 1583 iounmap(m66592->reg);
1584 free_irq(platform_get_irq(pdev, 0), m66592); 1584 free_irq(platform_get_irq(pdev, 0), m66592);
1585 m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req); 1585 m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
1586#ifdef CONFIG_HAVE_CLK
1587 if (m66592->pdata->on_chip) { 1586 if (m66592->pdata->on_chip) {
1588 clk_disable(m66592->clk); 1587 clk_disable(m66592->clk);
1589 clk_put(m66592->clk); 1588 clk_put(m66592->clk);
1590 } 1589 }
1591#endif
1592 kfree(m66592); 1590 kfree(m66592);
1593 return 0; 1591 return 0;
1594} 1592}
@@ -1602,9 +1600,7 @@ static int __init m66592_probe(struct platform_device *pdev)
1602 struct resource *res, *ires; 1600 struct resource *res, *ires;
1603 void __iomem *reg = NULL; 1601 void __iomem *reg = NULL;
1604 struct m66592 *m66592 = NULL; 1602 struct m66592 *m66592 = NULL;
1605#ifdef CONFIG_HAVE_CLK
1606 char clk_name[8]; 1603 char clk_name[8];
1607#endif
1608 int ret = 0; 1604 int ret = 0;
1609 int i; 1605 int i;
1610 1606
@@ -1671,7 +1667,6 @@ static int __init m66592_probe(struct platform_device *pdev)
1671 goto clean_up; 1667 goto clean_up;
1672 } 1668 }
1673 1669
1674#ifdef CONFIG_HAVE_CLK
1675 if (m66592->pdata->on_chip) { 1670 if (m66592->pdata->on_chip) {
1676 snprintf(clk_name, sizeof(clk_name), "usbf%d", pdev->id); 1671 snprintf(clk_name, sizeof(clk_name), "usbf%d", pdev->id);
1677 m66592->clk = clk_get(&pdev->dev, clk_name); 1672 m66592->clk = clk_get(&pdev->dev, clk_name);
@@ -1683,7 +1678,7 @@ static int __init m66592_probe(struct platform_device *pdev)
1683 } 1678 }
1684 clk_enable(m66592->clk); 1679 clk_enable(m66592->clk);
1685 } 1680 }
1686#endif 1681
1687 INIT_LIST_HEAD(&m66592->gadget.ep_list); 1682 INIT_LIST_HEAD(&m66592->gadget.ep_list);
1688 m66592->gadget.ep0 = &m66592->ep[0].ep; 1683 m66592->gadget.ep0 = &m66592->ep[0].ep;
1689 INIT_LIST_HEAD(&m66592->gadget.ep0->ep_list); 1684 INIT_LIST_HEAD(&m66592->gadget.ep0->ep_list);
@@ -1731,13 +1726,11 @@ err_add_udc:
1731 m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req); 1726 m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
1732 1727
1733clean_up3: 1728clean_up3:
1734#ifdef CONFIG_HAVE_CLK
1735 if (m66592->pdata->on_chip) { 1729 if (m66592->pdata->on_chip) {
1736 clk_disable(m66592->clk); 1730 clk_disable(m66592->clk);
1737 clk_put(m66592->clk); 1731 clk_put(m66592->clk);
1738 } 1732 }
1739clean_up2: 1733clean_up2:
1740#endif
1741 free_irq(ires->start, m66592); 1734 free_irq(ires->start, m66592);
1742clean_up: 1735clean_up:
1743 if (m66592) { 1736 if (m66592) {
diff --git a/drivers/usb/gadget/m66592-udc.h b/drivers/usb/gadget/m66592-udc.h
index 88c85b4116a2..16c7e14678b8 100644
--- a/drivers/usb/gadget/m66592-udc.h
+++ b/drivers/usb/gadget/m66592-udc.h
@@ -13,10 +13,7 @@
13#ifndef __M66592_UDC_H__ 13#ifndef __M66592_UDC_H__
14#define __M66592_UDC_H__ 14#define __M66592_UDC_H__
15 15
16#ifdef CONFIG_HAVE_CLK
17#include <linux/clk.h> 16#include <linux/clk.h>
18#endif
19
20#include <linux/usb/m66592.h> 17#include <linux/usb/m66592.h>
21 18
22#define M66592_SYSCFG 0x00 19#define M66592_SYSCFG 0x00
@@ -468,9 +465,7 @@ struct m66592_ep {
468struct m66592 { 465struct m66592 {
469 spinlock_t lock; 466 spinlock_t lock;
470 void __iomem *reg; 467 void __iomem *reg;
471#ifdef CONFIG_HAVE_CLK
472 struct clk *clk; 468 struct clk *clk;
473#endif
474 struct m66592_platdata *pdata; 469 struct m66592_platdata *pdata;
475 unsigned long irq_trigger; 470 unsigned long irq_trigger;
476 471