diff options
author | 2016-02-17 17:43:27 +0530 | |
---|---|---|
committer | 2016-02-17 14:19:30 +0100 | |
commit | a6ddd2f1b99f1c00b4e00289b13c3e451c7130b0 (patch) | |
tree | d06391a9709ff718d4fa5fa983148916e355987e /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Merge branch 'topic/mode_fixup-optional' into topic/drm-misc (diff) | |
download | linux-dev-a6ddd2f1b99f1c00b4e00289b13c3e451c7130b0.tar.xz linux-dev-a6ddd2f1b99f1c00b4e00289b13c3e451c7130b0.zip |
drm/udl: Use module_usb_driver
Macro module_usb_driver is used for drivers whose init and exit paths
only register and unregister to usb API. So remove boilerplate code to
make code simpler by using module_usb_driver.
This change was made with the help of the following Coccinelle
semantic patch:
//<smpl>
@a@
identifier f, x;
@@
-static f(...) { return usb_register(&x); }
@b depends on a@
identifier e, a.x;
@@
-static e(...) { usb_deregister(&x); }
@c depends on a && b@
identifier a.f;
declarer name module_init;
@@
-module_init(f);
@d depends on a && b && c@
identifier b.e, a.x;
declarer name module_exit;
declarer name module_usb_driver;
@@
-module_exit(e);
+module_usb_driver(x);
//</smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160217121327.GA29682@amitoj-Inspiron-3542
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions