summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-05 23:07:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-05 23:07:43 -0400
commitf72035fad84c9b51a45fd8afc8024f3df0ba8848 (patch)
tree9f6f740ee37bf11793f551c95435d2e8d687503e /drivers/staging
parent6c84239d595dc6ffe39f0f03dae2f64ed200db95 (diff)
parent0bf048abebb6e69be3c1630878419d80944c3cfd (diff)
downloadlinux-0-day-f72035fad84c9b51a45fd8afc8024f3df0ba8848.tar.gz
linux-0-day-f72035fad84c9b51a45fd8afc8024f3df0ba8848.tar.xz
Merge tag 'usb-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull more USB updates from Greg KH: "Here are a few more straggler patches for USB for 4.8-rc1. Most of these are for the usb-serial driver tree. All of those have been in linux-next for a long time, but missed my previous pull request to you. The remaining change is to fix up a staging tree build error, due to some USB gadget driver changes that went in. I put it in this tree as it was for a USB driver and people are reporting the build error on your tree. All of these have been in linux-next for this week, and longer for the usb-serial changes" * tag 'usb-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: staging: emxx_udc: allow modular build USB: serial: use variable for status USB: serial: option: add support for Telit LE910 PID 0x1206 USB: serial: cp210x: use kmemdup USB: serial: ti_usb_3410_5052: use functions rather than macros USB: serial: ti_usb_3410_5052: remove ti_usb_3410_5052.h USB: serial: ti_usb_3410_5052: use __packed USB: serial: ti_usb_3410_5052: remove useless comments
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/emxx_udc/Kconfig2
-rw-r--r--drivers/staging/emxx_udc/emxx_udc.c36
2 files changed, 33 insertions, 5 deletions
diff --git a/drivers/staging/emxx_udc/Kconfig b/drivers/staging/emxx_udc/Kconfig
index cc34020204874..d7577096fb25a 100644
--- a/drivers/staging/emxx_udc/Kconfig
+++ b/drivers/staging/emxx_udc/Kconfig
@@ -1,5 +1,5 @@
config USB_EMXX
- bool "EMXX USB Function Device Controller"
+ tristate "EMXX USB Function Device Controller"
depends on USB_GADGET && (ARCH_SHMOBILE || (ARM && COMPILE_TEST))
help
The Emma Mobile series of SoCs from Renesas Electronics and
diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index 3bd91758b2daa..3b56b28262639 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -15,7 +15,7 @@
*/
#include <linux/kernel.h>
-#include <linux/init.h>
+#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/ioport.h>
@@ -39,9 +39,11 @@
#include "emxx_udc.h"
+#define DRIVER_DESC "EMXX UDC driver"
#define DMA_ADDR_INVALID (~(dma_addr_t)0)
static const char driver_name[] = "emxx_udc";
+static const char driver_desc[] = DRIVER_DESC;
/*===========================================================================*/
/* Prototype */
@@ -3296,6 +3298,28 @@ static void nbu2ss_drv_shutdown(struct platform_device *pdev)
}
/*-------------------------------------------------------------------------*/
+static int nbu2ss_drv_remove(struct platform_device *pdev)
+{
+ struct nbu2ss_udc *udc;
+ struct nbu2ss_ep *ep;
+ int i;
+
+ udc = &udc_controller;
+
+ for (i = 0; i < NUM_ENDPOINTS; i++) {
+ ep = &udc->ep[i];
+ if (ep->virt_buf)
+ dma_free_coherent(NULL, PAGE_SIZE,
+ (void *)ep->virt_buf, ep->phys_buf);
+ }
+
+ /* Interrupt Handler - Release */
+ free_irq(INT_VBUS, udc);
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------*/
static int nbu2ss_drv_suspend(struct platform_device *pdev, pm_message_t state)
{
struct nbu2ss_udc *udc;
@@ -3347,12 +3371,16 @@ static int nbu2ss_drv_resume(struct platform_device *pdev)
static struct platform_driver udc_driver = {
.probe = nbu2ss_drv_probe,
.shutdown = nbu2ss_drv_shutdown,
+ .remove = nbu2ss_drv_remove,
.suspend = nbu2ss_drv_suspend,
.resume = nbu2ss_drv_resume,
.driver = {
- .name = driver_name,
- .suppress_bind_attrs = true,
+ .name = driver_name,
},
};
-builtin_platform_driver(udc_driver);
+module_platform_driver(udc_driver);
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_AUTHOR("Renesas Electronics Corporation");
+MODULE_LICENSE("GPL");