aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/dvb-usb.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-07-31 10:24:57 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 15:43:43 -0400
commit34abf2194499571b2efa6b4aface8c0ea0c47ce1 (patch)
treee2698d258ad65a7878fbc4b6c9e3de81228fb3ef /drivers/media/dvb/dvb-usb/dvb-usb.h
parent0172fea3c0cf55b61bc94738db3ece513264774c (diff)
V4L/DVB: dvb-usb: get rid of struct dvb_usb_rc_key
dvb-usb has its own IR handle code. Now that we have a Remote Controller subsystem, we should start using it. So, remove this struct, in favor of the similar struct defined at the RC subsystem. This is a big, but trivial patch. It is a 3 line delect, plus lots of rename on several dvb-usb files. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb.h')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb.h28
1 files changed, 9 insertions, 19 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h
index 4a9f676087bf..832bbfd55f5b 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -14,6 +14,7 @@
14#include <linux/usb.h> 14#include <linux/usb.h>
15#include <linux/firmware.h> 15#include <linux/firmware.h>
16#include <linux/mutex.h> 16#include <linux/mutex.h>
17#include <media/rc-map.h>
17 18
18#include "dvb_frontend.h" 19#include "dvb_frontend.h"
19#include "dvb_demux.h" 20#include "dvb_demux.h"
@@ -74,30 +75,19 @@ struct dvb_usb_device_description {
74 struct usb_device_id *warm_ids[DVB_USB_ID_MAX_NUM]; 75 struct usb_device_id *warm_ids[DVB_USB_ID_MAX_NUM];
75}; 76};
76 77
77/** 78static inline u8 rc5_custom(struct ir_scancode *key)
78 * struct dvb_usb_rc_key - a remote control key and its input-event
79 * @custom: the vendor/custom part of the key
80 * @data: the actual key part
81 * @event: the input event assigned to key identified by custom and data
82 */
83struct dvb_usb_rc_key {
84 u16 scan;
85 u32 event;
86};
87
88static inline u8 rc5_custom(struct dvb_usb_rc_key *key)
89{ 79{
90 return (key->scan >> 8) & 0xff; 80 return (key->scancode >> 8) & 0xff;
91} 81}
92 82
93static inline u8 rc5_data(struct dvb_usb_rc_key *key) 83static inline u8 rc5_data(struct ir_scancode *key)
94{ 84{
95 return key->scan & 0xff; 85 return key->scancode & 0xff;
96} 86}
97 87
98static inline u8 rc5_scan(struct dvb_usb_rc_key *key) 88static inline u8 rc5_scan(struct ir_scancode *key)
99{ 89{
100 return key->scan & 0xffff; 90 return key->scancode & 0xffff;
101} 91}
102 92
103struct dvb_usb_device; 93struct dvb_usb_device;
@@ -185,7 +175,7 @@ struct dvb_usb_adapter_properties {
185 * @identify_state: called to determine the state (cold or warm), when it 175 * @identify_state: called to determine the state (cold or warm), when it
186 * is not distinguishable by the USB IDs. 176 * is not distinguishable by the USB IDs.
187 * 177 *
188 * @rc_key_map: a hard-wired array of struct dvb_usb_rc_key (NULL to disable 178 * @rc_key_map: a hard-wired array of struct ir_scancode (NULL to disable
189 * remote control handling). 179 * remote control handling).
190 * @rc_key_map_size: number of items in @rc_key_map. 180 * @rc_key_map_size: number of items in @rc_key_map.
191 * @rc_query: called to query an event event. 181 * @rc_query: called to query an event event.
@@ -237,7 +227,7 @@ struct dvb_usb_device_properties {
237#define REMOTE_NO_KEY_PRESSED 0x00 227#define REMOTE_NO_KEY_PRESSED 0x00
238#define REMOTE_KEY_PRESSED 0x01 228#define REMOTE_KEY_PRESSED 0x01
239#define REMOTE_KEY_REPEAT 0x02 229#define REMOTE_KEY_REPEAT 0x02
240 struct dvb_usb_rc_key *rc_key_map; 230 struct ir_scancode *rc_key_map;
241 int rc_key_map_size; 231 int rc_key_map_size;
242 int (*rc_query) (struct dvb_usb_device *, u32 *, int *); 232 int (*rc_query) (struct dvb_usb_device *, u32 *, int *);
243 int rc_interval; 233 int rc_interval;