miscdevice: Add helper macro for misc device boilerplate
authorPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Thu, 25 Aug 2016 17:00:49 +0000 (22:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2016 12:12:35 +0000 (14:12 +0200)
commitca75d601b5942e8cf5eed68f308be0526d0dac5d
treeca411c99f5715a5976eb942a061dfa3b2b6e841d
parent832c8232dd7be4977ae9fb9c7cbc4decce19a8fc
miscdevice: Add helper macro for misc device boilerplate

Many modules call misc_register and misc_deregister in its module init
and exit methods without any additional code. This ends up being
boilerplate. This patch adds helper macro module_misc_device(), that
replaces module_init()/ module_exit() with template functions.

This patch also converts drivers to use new macro.

Change since v1:
Add device.h include in miscdevice.h as module_driver macro was not
available from other include files in some architectures.

Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/common/bL_switcher_dummy_if.c
arch/blackfin/mach-bf561/coreb.c
drivers/hid/uhid.c
drivers/input/misc/uinput.c
drivers/s390/char/sclp_ctl.c
drivers/vhost/test.c
include/linux/miscdevice.h
This page took 0.027055 seconds and 5 git commands to generate.