From 18726a349de262f5bf03fab73fc7c46e79e6c41e Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Thu, 27 Apr 2017 17:34:08 -0300 Subject: [media] rc-core: cleanup rc_register_device pt2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that rc_register_device() is reorganised, the dev->initialized hack can be removed. Any driver which calls rc_register_device() must be prepared for the device to go live immediately. The dev->initialized commits that are relevant are commit c73bbaa4ec3e ("[media] rc-core: don't lock device at rc_register_device()") and commit 08aeb7c9a42a ("[media] rc: add locking to fix register/show race"). The original problem was that show_protocols() would access dev->rc_map.* and various other bits which are now properly initialized before device_add() is called. At the same time, remove the bogus "device is being removed" check. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- include/media/rc-core.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/media/rc-core.h') diff --git a/include/media/rc-core.h b/include/media/rc-core.h index 73ddd721d7ba..78dea39a9b39 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h @@ -70,7 +70,6 @@ enum rc_filter_type { /** * struct rc_dev - represents a remote control device * @dev: driver model's view of this device - * @initialized: 1 if the device init has completed, 0 otherwise * @managed_alloc: devm_rc_allocate_device was used to create rc_dev * @sysfs_groups: sysfs attribute groups * @input_name: name of the input child device @@ -137,7 +136,6 @@ enum rc_filter_type { */ struct rc_dev { struct device dev; - atomic_t initialized; bool managed_alloc; const struct attribute_group *sysfs_groups[5]; const char *input_name; -- cgit v1.2.3