|
15 | 15 | */
|
16 | 16 |
|
17 | 17 | #include <linux/kernel.h>
|
18 |
| -#include <linux/module.h> |
| 18 | +#include <linux/init.h> |
19 | 19 | #include <linux/platform_device.h>
|
20 | 20 | #include <linux/delay.h>
|
21 | 21 | #include <linux/ioport.h>
|
|
40 | 40 |
|
41 | 41 | #include "emxx_udc.h"
|
42 | 42 |
|
43 |
| -#define DRIVER_DESC "EMXX UDC driver" |
44 | 43 | #define DMA_ADDR_INVALID (~(dma_addr_t)0)
|
45 | 44 |
|
46 | 45 | static const char driver_name[] = "emxx_udc";
|
47 |
| -static const char driver_desc[] = DRIVER_DESC; |
48 | 46 |
|
49 | 47 | /*===========================================================================*/
|
50 | 48 | /* Prototype */
|
@@ -3320,28 +3318,6 @@ static void nbu2ss_drv_shutdown(struct platform_device *pdev)
|
3320 | 3318 | _nbu2ss_disable_controller(udc);
|
3321 | 3319 | }
|
3322 | 3320 |
|
3323 |
| -/*-------------------------------------------------------------------------*/ |
3324 |
| -static int __exit nbu2ss_drv_remove(struct platform_device *pdev) |
3325 |
| -{ |
3326 |
| - struct nbu2ss_udc *udc; |
3327 |
| - struct nbu2ss_ep *ep; |
3328 |
| - int i; |
3329 |
| - |
3330 |
| - udc = &udc_controller; |
3331 |
| - |
3332 |
| - for (i = 0; i < NUM_ENDPOINTS; i++) { |
3333 |
| - ep = &udc->ep[i]; |
3334 |
| - if (ep->virt_buf) |
3335 |
| - dma_free_coherent(NULL, PAGE_SIZE, |
3336 |
| - (void *)ep->virt_buf, ep->phys_buf); |
3337 |
| - } |
3338 |
| - |
3339 |
| - /* Interrupt Handler - Release */ |
3340 |
| - free_irq(INT_VBUS, udc); |
3341 |
| - |
3342 |
| - return 0; |
3343 |
| -} |
3344 |
| - |
3345 | 3321 | /*-------------------------------------------------------------------------*/
|
3346 | 3322 | static int nbu2ss_drv_suspend(struct platform_device *pdev, pm_message_t state)
|
3347 | 3323 | {
|
@@ -3394,17 +3370,12 @@ static int nbu2ss_drv_resume(struct platform_device *pdev)
|
3394 | 3370 | static struct platform_driver udc_driver = {
|
3395 | 3371 | .probe = nbu2ss_drv_probe,
|
3396 | 3372 | .shutdown = nbu2ss_drv_shutdown,
|
3397 |
| - .remove = __exit_p(nbu2ss_drv_remove), |
3398 | 3373 | .suspend = nbu2ss_drv_suspend,
|
3399 | 3374 | .resume = nbu2ss_drv_resume,
|
3400 | 3375 | .driver = {
|
3401 |
| - .name = driver_name, |
| 3376 | + .name = driver_name, |
| 3377 | + .suppress_bind_attrs = true, |
3402 | 3378 | },
|
3403 | 3379 | };
|
3404 | 3380 |
|
3405 |
| -module_platform_driver(udc_driver); |
3406 |
| - |
3407 |
| -MODULE_DESCRIPTION(DRIVER_DESC); |
3408 |
| -MODULE_AUTHOR("Renesas Electronics Corporation"); |
3409 |
| -MODULE_LICENSE("GPL"); |
3410 |
| - |
| 3381 | +builtin_platform_driver(udc_driver); |
0 commit comments