Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (10129): dvb: remove deprecated use of RW_LOCK_UNLOCKED in frontends

Impact: clean up

RW_LOCK_UNLOCKED is deprecated. This patch replaces it with the
__RW_LOCK_UNLOCKED(lock) macro. This change was a little trickier than
others due to the macro being used in another macro that fills an array.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Steven Rostedt and committed by
Mauro Carvalho Chehab
cec73844 aa16c10a

+8 -8
+6 -6
drivers/media/dvb/frontends/drx397xD.c
··· 39 39 #define F_SET_0D4h 2 40 40 41 41 enum fw_ix { 42 - #define _FW_ENTRY(a, b) b 42 + #define _FW_ENTRY(a, b, c) b 43 43 #include "drx397xD_fw.h" 44 44 }; 45 45 ··· 72 72 int refcnt; 73 73 const u8 *data[ARRAY_SIZE(blob_name)]; 74 74 } fw[] = { 75 - #define _FW_ENTRY(a, b) { \ 76 - .name = a, \ 77 - .file = 0, \ 78 - .lock = RW_LOCK_UNLOCKED, \ 79 - .refcnt = 0, \ 75 + #define _FW_ENTRY(a, b, c) { \ 76 + .name = a, \ 77 + .file = 0, \ 78 + .lock = __RW_LOCK_UNLOCKED(fw[c].lock), \ 79 + .refcnt = 0, \ 80 80 .data = { } } 81 81 #include "drx397xD_fw.h" 82 82 };
+2 -2
drivers/media/dvb/frontends/drx397xD_fw.h
··· 18 18 */ 19 19 20 20 #ifdef _FW_ENTRY 21 - _FW_ENTRY("drx397xD.A2.fw", DRXD_FW_A2 = 0 ), 22 - _FW_ENTRY("drx397xD.B1.fw", DRXD_FW_B1 ), 21 + _FW_ENTRY("drx397xD.A2.fw", DRXD_FW_A2 = 0, DRXD_FW_A2 ), 22 + _FW_ENTRY("drx397xD.B1.fw", DRXD_FW_B1, DRXD_FW_B1 ), 23 23 #undef _FW_ENTRY 24 24 #endif /* _FW_ENTRY */ 25 25