treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / rc / keymaps / rc-kworld-pc150u.c
blob7938761eb9949b42250e0850e8d269413cb35f33
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* kworld-pc150u.c - Keytable for kworld_pc150u Remote Controller
4 * keymap imported from ir-keymaps.c
6 * Copyright (c) 2010 by Kyle Strickland
7 * (based on kworld-plus-tv-analog.c by
8 * Mauro Carvalho Chehab)
9 */
11 #include <media/rc-map.h>
12 #include <linux/module.h>
14 /* Kworld PC150-U
15 Kyle Strickland <kyle@kyle.strickland.name>
18 static struct rc_map_table kworld_pc150u[] = {
19 { 0x0c, KEY_MEDIA }, /* Kworld key */
20 { 0x16, KEY_EJECTCLOSECD }, /* -> ) */
21 { 0x1d, KEY_POWER2 },
23 { 0x00, KEY_NUMERIC_1 },
24 { 0x01, KEY_NUMERIC_2 },
25 { 0x02, KEY_NUMERIC_3 },
26 { 0x03, KEY_NUMERIC_4 },
27 { 0x04, KEY_NUMERIC_5 },
28 { 0x05, KEY_NUMERIC_6 },
29 { 0x06, KEY_NUMERIC_7 },
30 { 0x07, KEY_NUMERIC_8 },
31 { 0x08, KEY_NUMERIC_9 },
32 { 0x0a, KEY_NUMERIC_0 },
34 { 0x09, KEY_AGAIN },
35 { 0x14, KEY_MUTE },
37 { 0x1e, KEY_LAST },
38 { 0x17, KEY_ZOOM },
39 { 0x1f, KEY_HOMEPAGE },
40 { 0x0e, KEY_ESC },
42 { 0x20, KEY_UP },
43 { 0x21, KEY_DOWN },
44 { 0x42, KEY_LEFT },
45 { 0x43, KEY_RIGHT },
46 { 0x0b, KEY_ENTER },
48 { 0x10, KEY_CHANNELUP },
49 { 0x11, KEY_CHANNELDOWN },
51 { 0x13, KEY_VOLUMEUP },
52 { 0x12, KEY_VOLUMEDOWN },
54 { 0x19, KEY_TIME}, /* Timeshift */
55 { 0x1a, KEY_STOP},
56 { 0x1b, KEY_RECORD},
57 { 0x4b, KEY_EMAIL},
59 { 0x40, KEY_REWIND},
60 { 0x44, KEY_PLAYPAUSE},
61 { 0x41, KEY_FORWARD},
62 { 0x22, KEY_TEXT},
64 { 0x15, KEY_AUDIO}, /* ((*)) */
65 { 0x0f, KEY_MODE}, /* display ratio */
66 { 0x1c, KEY_SYSRQ}, /* snapshot */
67 { 0x4a, KEY_SLEEP}, /* sleep timer */
69 { 0x48, KEY_SOUND}, /* switch theater mode */
70 { 0x49, KEY_BLUE}, /* A */
71 { 0x18, KEY_RED}, /* B */
72 { 0x23, KEY_GREEN}, /* C */
75 static struct rc_map_list kworld_pc150u_map = {
76 .map = {
77 .scan = kworld_pc150u,
78 .size = ARRAY_SIZE(kworld_pc150u),
79 .rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */
80 .name = RC_MAP_KWORLD_PC150U,
84 static int __init init_rc_map_kworld_pc150u(void)
86 return rc_map_register(&kworld_pc150u_map);
89 static void __exit exit_rc_map_kworld_pc150u(void)
91 rc_map_unregister(&kworld_pc150u_map);
94 module_init(init_rc_map_kworld_pc150u)
95 module_exit(exit_rc_map_kworld_pc150u)
97 MODULE_LICENSE("GPL");
98 MODULE_AUTHOR("Kyle Strickland <kyle@kyle.strickland.name>");