diff options
Diffstat (limited to 'drivers/usb/gadget/r8a66597-udc.c')
-rw-r--r-- | drivers/usb/gadget/r8a66597-udc.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index f46a1b77ce3e..0b742d171843 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c | |||
@@ -1837,7 +1837,6 @@ static int __exit r8a66597_remove(struct platform_device *pdev) | |||
1837 | clk_put(r8a66597->clk); | 1837 | clk_put(r8a66597->clk); |
1838 | } | 1838 | } |
1839 | 1839 | ||
1840 | device_unregister(&r8a66597->gadget.dev); | ||
1841 | kfree(r8a66597); | 1840 | kfree(r8a66597); |
1842 | return 0; | 1841 | return 0; |
1843 | } | 1842 | } |
@@ -1915,17 +1914,8 @@ static int __init r8a66597_probe(struct platform_device *pdev) | |||
1915 | r8a66597->irq_sense_low = irq_trigger == IRQF_TRIGGER_LOW; | 1914 | r8a66597->irq_sense_low = irq_trigger == IRQF_TRIGGER_LOW; |
1916 | 1915 | ||
1917 | r8a66597->gadget.ops = &r8a66597_gadget_ops; | 1916 | r8a66597->gadget.ops = &r8a66597_gadget_ops; |
1918 | dev_set_name(&r8a66597->gadget.dev, "gadget"); | ||
1919 | r8a66597->gadget.max_speed = USB_SPEED_HIGH; | 1917 | r8a66597->gadget.max_speed = USB_SPEED_HIGH; |
1920 | r8a66597->gadget.dev.parent = &pdev->dev; | ||
1921 | r8a66597->gadget.dev.dma_mask = pdev->dev.dma_mask; | ||
1922 | r8a66597->gadget.dev.release = pdev->dev.release; | ||
1923 | r8a66597->gadget.name = udc_name; | 1918 | r8a66597->gadget.name = udc_name; |
1924 | ret = device_register(&r8a66597->gadget.dev); | ||
1925 | if (ret < 0) { | ||
1926 | dev_err(&pdev->dev, "device_register failed\n"); | ||
1927 | goto clean_up; | ||
1928 | } | ||
1929 | 1919 | ||
1930 | init_timer(&r8a66597->timer); | 1920 | init_timer(&r8a66597->timer); |
1931 | r8a66597->timer.function = r8a66597_timer; | 1921 | r8a66597->timer.function = r8a66597_timer; |
@@ -1939,7 +1929,7 @@ static int __init r8a66597_probe(struct platform_device *pdev) | |||
1939 | dev_err(&pdev->dev, "cannot get clock \"%s\"\n", | 1929 | dev_err(&pdev->dev, "cannot get clock \"%s\"\n", |
1940 | clk_name); | 1930 | clk_name); |
1941 | ret = PTR_ERR(r8a66597->clk); | 1931 | ret = PTR_ERR(r8a66597->clk); |
1942 | goto clean_up_dev; | 1932 | goto clean_up; |
1943 | } | 1933 | } |
1944 | clk_enable(r8a66597->clk); | 1934 | clk_enable(r8a66597->clk); |
1945 | } | 1935 | } |
@@ -2007,8 +1997,6 @@ clean_up2: | |||
2007 | clk_disable(r8a66597->clk); | 1997 | clk_disable(r8a66597->clk); |
2008 | clk_put(r8a66597->clk); | 1998 | clk_put(r8a66597->clk); |
2009 | } | 1999 | } |
2010 | clean_up_dev: | ||
2011 | device_unregister(&r8a66597->gadget.dev); | ||
2012 | clean_up: | 2000 | clean_up: |
2013 | if (r8a66597) { | 2001 | if (r8a66597) { |
2014 | if (r8a66597->sudmac_reg) | 2002 | if (r8a66597->sudmac_reg) |