aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/IR/ir-keytable.c393
-rw-r--r--drivers/media/IR/keymaps/rc-manli.c1
-rw-r--r--drivers/media/IR/lirc_dev.c1
-rw-r--r--drivers/media/dvb/ttpci/av7110.c9
-rw-r--r--drivers/media/dvb/ttpci/av7110_av.c2
-rw-r--r--drivers/media/dvb/ttpci/av7110_ca.c2
-rw-r--r--drivers/media/dvb/ttpci/av7110_hw.c2
-rw-r--r--drivers/media/dvb/ttpci/av7110_v4l.c2
-rw-r--r--drivers/media/dvb/ttpci/budget-av.c2
-rw-r--r--drivers/media/dvb/ttpci/budget-ci.c2
-rw-r--r--drivers/media/dvb/ttpci/budget-core.c2
-rw-r--r--drivers/media/dvb/ttpci/budget-patch.c2
-rw-r--r--drivers/media/dvb/ttpci/budget.c2
-rw-r--r--drivers/media/radio/radio-maxiradio.c2
-rw-r--r--drivers/media/radio/radio-typhoon.c3
-rw-r--r--drivers/media/video/Kconfig2
-rw-r--r--drivers/media/video/cafe_ccic.c2
-rw-r--r--drivers/media/video/cx18/cx18-cards.c2
-rw-r--r--drivers/media/video/cx23885/cx23885-417.c2
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c2
-rw-r--r--drivers/media/video/ivtv/ivtv-cards.c2
-rw-r--r--drivers/media/video/mxb.c2
-rw-r--r--drivers/media/video/sn9c102/sn9c102_pas202bcb.c1
-rw-r--r--drivers/media/video/zoran/videocodec.h2
-rw-r--r--drivers/media/video/zoran/zoran_driver.c2
25 files changed, 283 insertions, 163 deletions
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c
index 7961d59f5cac..c06b4d50a3dc 100644
--- a/drivers/media/IR/ir-keytable.c
+++ b/drivers/media/IR/ir-keytable.c
@@ -25,14 +25,56 @@
25#define IR_KEYPRESS_TIMEOUT 250 25#define IR_KEYPRESS_TIMEOUT 250
26 26
27/** 27/**
28 * ir_create_table() - initializes a scancode table
29 * @rc_tab: the ir_scancode_table to initialize
30 * @name: name to assign to the table
31 * @ir_type: ir type to assign to the new table
32 * @size: initial size of the table
33 * @return: zero on success or a negative error code
34 *
35 * This routine will initialize the ir_scancode_table and will allocate
36 * memory to hold at least the specified number elements.
37 */
38static int ir_create_table(struct ir_scancode_table *rc_tab,
39 const char *name, u64 ir_type, size_t size)
40{
41 rc_tab->name = name;
42 rc_tab->ir_type = ir_type;
43 rc_tab->alloc = roundup_pow_of_two(size * sizeof(struct ir_scancode));
44 rc_tab->size = rc_tab->alloc / sizeof(struct ir_scancode);
45 rc_tab->scan = kmalloc(rc_tab->alloc, GFP_KERNEL);
46 if (!rc_tab->scan)
47 return -ENOMEM;
48
49 IR_dprintk(1, "Allocated space for %u keycode entries (%u bytes)\n",
50 rc_tab->size, rc_tab->alloc);
51 return 0;
52}
53
54/**
55 * ir_free_table() - frees memory allocated by a scancode table
56 * @rc_tab: the table whose mappings need to be freed
57 *
58 * This routine will free memory alloctaed for key mappings used by given
59 * scancode table.
60 */
61static void ir_free_table(struct ir_scancode_table *rc_tab)
62{
63 rc_tab->size = 0;
64 kfree(rc_tab->scan);
65 rc_tab->scan = NULL;
66}
67
68/**
28 * ir_resize_table() - resizes a scancode table if necessary 69 * ir_resize_table() - resizes a scancode table if necessary
29 * @rc_tab: the ir_scancode_table to resize 70 * @rc_tab: the ir_scancode_table to resize
71 * @gfp_flags: gfp flags to use when allocating memory
30 * @return: zero on success or a negative error code 72 * @return: zero on success or a negative error code
31 * 73 *
32 * This routine will shrink the ir_scancode_table if it has lots of 74 * This routine will shrink the ir_scancode_table if it has lots of
33 * unused entries and grow it if it is full. 75 * unused entries and grow it if it is full.
34 */ 76 */
35static int ir_resize_table(struct ir_scancode_table *rc_tab) 77static int ir_resize_table(struct ir_scancode_table *rc_tab, gfp_t gfp_flags)
36{ 78{
37 unsigned int oldalloc = rc_tab->alloc; 79 unsigned int oldalloc = rc_tab->alloc;
38 unsigned int newalloc = oldalloc; 80 unsigned int newalloc = oldalloc;
@@ -57,7 +99,7 @@ static int ir_resize_table(struct ir_scancode_table *rc_tab)
57 if (newalloc == oldalloc) 99 if (newalloc == oldalloc)
58 return 0; 100 return 0;
59 101
60 newscan = kmalloc(newalloc, GFP_ATOMIC); 102 newscan = kmalloc(newalloc, gfp_flags);
61 if (!newscan) { 103 if (!newscan) {
62 IR_dprintk(1, "Failed to kmalloc %u bytes\n", newalloc); 104 IR_dprintk(1, "Failed to kmalloc %u bytes\n", newalloc);
63 return -ENOMEM; 105 return -ENOMEM;
@@ -72,26 +114,78 @@ static int ir_resize_table(struct ir_scancode_table *rc_tab)
72} 114}
73 115
74/** 116/**
75 * ir_do_setkeycode() - internal function to set a keycode in the 117 * ir_update_mapping() - set a keycode in the scancode->keycode table
76 * scancode->keycode table
77 * @dev: the struct input_dev device descriptor 118 * @dev: the struct input_dev device descriptor
78 * @rc_tab: the struct ir_scancode_table to set the keycode in 119 * @rc_tab: scancode table to be adjusted
79 * @scancode: the scancode for the ir command 120 * @index: index of the mapping that needs to be updated
80 * @keycode: the keycode for the ir command 121 * @keycode: the desired keycode
81 * @resize: whether the keytable may be shrunk 122 * @return: previous keycode assigned to the mapping
82 * @return: -EINVAL if the keycode could not be inserted, otherwise zero. 123 *
124 * This routine is used to update scancode->keycopde mapping at given
125 * position.
126 */
127static unsigned int ir_update_mapping(struct input_dev *dev,
128 struct ir_scancode_table *rc_tab,
129 unsigned int index,
130 unsigned int new_keycode)
131{
132 int old_keycode = rc_tab->scan[index].keycode;
133 int i;
134
135 /* Did the user wish to remove the mapping? */
136 if (new_keycode == KEY_RESERVED || new_keycode == KEY_UNKNOWN) {
137 IR_dprintk(1, "#%d: Deleting scan 0x%04x\n",
138 index, rc_tab->scan[index].scancode);
139 rc_tab->len--;
140 memmove(&rc_tab->scan[index], &rc_tab->scan[index+ 1],
141 (rc_tab->len - index) * sizeof(struct ir_scancode));
142 } else {
143 IR_dprintk(1, "#%d: %s scan 0x%04x with key 0x%04x\n",
144 index,
145 old_keycode == KEY_RESERVED ? "New" : "Replacing",
146 rc_tab->scan[index].scancode, new_keycode);
147 rc_tab->scan[index].keycode = new_keycode;
148 __set_bit(new_keycode, dev->keybit);
149 }
150
151 if (old_keycode != KEY_RESERVED) {
152 /* A previous mapping was updated... */
153 __clear_bit(old_keycode, dev->keybit);
154 /* ... but another scancode might use the same keycode */
155 for (i = 0; i < rc_tab->len; i++) {
156 if (rc_tab->scan[i].keycode == old_keycode) {
157 __set_bit(old_keycode, dev->keybit);
158 break;
159 }
160 }
161
162 /* Possibly shrink the keytable, failure is not a problem */
163 ir_resize_table(rc_tab, GFP_ATOMIC);
164 }
165
166 return old_keycode;
167}
168
169/**
170 * ir_locate_scancode() - set a keycode in the scancode->keycode table
171 * @ir_dev: the struct ir_input_dev device descriptor
172 * @rc_tab: scancode table to be searched
173 * @scancode: the desired scancode
174 * @resize: controls whether we allowed to resize the table to
175 * accomodate not yet present scancodes
176 * @return: index of the mapping containing scancode in question
177 * or -1U in case of failure.
83 * 178 *
84 * This routine is used internally to manipulate the scancode->keycode table. 179 * This routine is used to locate given scancode in ir_scancode_table.
85 * The caller has to hold @rc_tab->lock. 180 * If scancode is not yet present the routine will allocate a new slot
181 * for it.
86 */ 182 */
87static int ir_do_setkeycode(struct input_dev *dev, 183static unsigned int ir_establish_scancode(struct ir_input_dev *ir_dev,
88 struct ir_scancode_table *rc_tab, 184 struct ir_scancode_table *rc_tab,
89 unsigned scancode, unsigned keycode, 185 unsigned int scancode,
90 bool resize) 186 bool resize)
91{ 187{
92 unsigned int i; 188 unsigned int i;
93 int old_keycode = KEY_RESERVED;
94 struct ir_input_dev *ir_dev = input_get_drvdata(dev);
95 189
96 /* 190 /*
97 * Unfortunately, some hardware-based IR decoders don't provide 191 * Unfortunately, some hardware-based IR decoders don't provide
@@ -100,65 +194,34 @@ static int ir_do_setkeycode(struct input_dev *dev,
100 * the provided IR with another one, it is needed to allow loading 194 * the provided IR with another one, it is needed to allow loading
101 * IR tables from other remotes. So, 195 * IR tables from other remotes. So,
102 */ 196 */
103 if (ir_dev->props && ir_dev->props->scanmask) { 197 if (ir_dev->props && ir_dev->props->scanmask)
104 scancode &= ir_dev->props->scanmask; 198 scancode &= ir_dev->props->scanmask;
105 }
106 199
107 /* First check if we already have a mapping for this ir command */ 200 /* First check if we already have a mapping for this ir command */
108 for (i = 0; i < rc_tab->len; i++) { 201 for (i = 0; i < rc_tab->len; i++) {
202 if (rc_tab->scan[i].scancode == scancode)
203 return i;
204
109 /* Keytable is sorted from lowest to highest scancode */ 205 /* Keytable is sorted from lowest to highest scancode */
110 if (rc_tab->scan[i].scancode > scancode) 206 if (rc_tab->scan[i].scancode >= scancode)
111 break; 207 break;
112 else if (rc_tab->scan[i].scancode < scancode)
113 continue;
114
115 old_keycode = rc_tab->scan[i].keycode;
116 rc_tab->scan[i].keycode = keycode;
117
118 /* Did the user wish to remove the mapping? */
119 if (keycode == KEY_RESERVED || keycode == KEY_UNKNOWN) {
120 IR_dprintk(1, "#%d: Deleting scan 0x%04x\n",
121 i, scancode);
122 rc_tab->len--;
123 memmove(&rc_tab->scan[i], &rc_tab->scan[i + 1],
124 (rc_tab->len - i) * sizeof(struct ir_scancode));
125 }
126
127 /* Possibly shrink the keytable, failure is not a problem */
128 ir_resize_table(rc_tab);
129 break;
130 } 208 }
131 209
132 if (old_keycode == KEY_RESERVED && keycode != KEY_RESERVED) { 210 /* No previous mapping found, we might need to grow the table */
133 /* No previous mapping found, we might need to grow the table */ 211 if (rc_tab->size == rc_tab->len) {
134 if (resize && ir_resize_table(rc_tab)) 212 if (!resize || ir_resize_table(rc_tab, GFP_ATOMIC))
135 return -ENOMEM; 213 return -1U;
136 214 }
137 IR_dprintk(1, "#%d: New scan 0x%04x with key 0x%04x\n",
138 i, scancode, keycode);
139 215
140 /* i is the proper index to insert our new keycode */ 216 /* i is the proper index to insert our new keycode */
217 if (i < rc_tab->len)
141 memmove(&rc_tab->scan[i + 1], &rc_tab->scan[i], 218 memmove(&rc_tab->scan[i + 1], &rc_tab->scan[i],
142 (rc_tab->len - i) * sizeof(struct ir_scancode)); 219 (rc_tab->len - i) * sizeof(struct ir_scancode));
143 rc_tab->scan[i].scancode = scancode; 220 rc_tab->scan[i].scancode = scancode;
144 rc_tab->scan[i].keycode = keycode; 221 rc_tab->scan[i].keycode = KEY_RESERVED;
145 rc_tab->len++; 222 rc_tab->len++;
146 set_bit(keycode, dev->keybit);
147 } else {
148 IR_dprintk(1, "#%d: Replacing scan 0x%04x with key 0x%04x\n",
149 i, scancode, keycode);
150 /* A previous mapping was updated... */
151 clear_bit(old_keycode, dev->keybit);
152 /* ...but another scancode might use the same keycode */
153 for (i = 0; i < rc_tab->len; i++) {
154 if (rc_tab->scan[i].keycode == old_keycode) {
155 set_bit(old_keycode, dev->keybit);
156 break;
157 }
158 }
159 }
160 223
161 return 0; 224 return i;
162} 225}
163 226
164/** 227/**
@@ -171,17 +234,41 @@ static int ir_do_setkeycode(struct input_dev *dev,
171 * This routine is used to handle evdev EVIOCSKEY ioctl. 234 * This routine is used to handle evdev EVIOCSKEY ioctl.
172 */ 235 */
173static int ir_setkeycode(struct input_dev *dev, 236static int ir_setkeycode(struct input_dev *dev,
174 unsigned int scancode, unsigned int keycode) 237 const struct input_keymap_entry *ke,
238 unsigned int *old_keycode)
175{ 239{
176 int rc;
177 unsigned long flags;
178 struct ir_input_dev *ir_dev = input_get_drvdata(dev); 240 struct ir_input_dev *ir_dev = input_get_drvdata(dev);
179 struct ir_scancode_table *rc_tab = &ir_dev->rc_tab; 241 struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
242 unsigned int index;
243 unsigned int scancode;
244 int retval;
245 unsigned long flags;
180 246
181 spin_lock_irqsave(&rc_tab->lock, flags); 247 spin_lock_irqsave(&rc_tab->lock, flags);
182 rc = ir_do_setkeycode(dev, rc_tab, scancode, keycode, true); 248
249 if (ke->flags & INPUT_KEYMAP_BY_INDEX) {
250 index = ke->index;
251 if (index >= rc_tab->len) {
252 retval = -EINVAL;
253 goto out;
254 }
255 } else {
256 retval = input_scancode_to_scalar(ke, &scancode);
257 if (retval)
258 goto out;
259
260 index = ir_establish_scancode(ir_dev, rc_tab, scancode, true);
261 if (index >= rc_tab->len) {
262 retval = -ENOMEM;
263 goto out;
264 }
265 }
266
267 *old_keycode = ir_update_mapping(dev, rc_tab, index, ke->keycode);
268
269out:
183 spin_unlock_irqrestore(&rc_tab->lock, flags); 270 spin_unlock_irqrestore(&rc_tab->lock, flags);
184 return rc; 271 return retval;
185} 272}
186 273
187/** 274/**
@@ -189,32 +276,73 @@ static int ir_setkeycode(struct input_dev *dev,
189 * @dev: the struct input_dev device descriptor 276 * @dev: the struct input_dev device descriptor
190 * @to: the struct ir_scancode_table to copy entries to 277 * @to: the struct ir_scancode_table to copy entries to
191 * @from: the struct ir_scancode_table to copy entries from 278 * @from: the struct ir_scancode_table to copy entries from
192 * @return: -EINVAL if all keycodes could not be inserted, otherwise zero. 279 * @return: -ENOMEM if all keycodes could not be inserted, otherwise zero.
193 * 280 *
194 * This routine is used to handle table initialization. 281 * This routine is used to handle table initialization.
195 */ 282 */
196static int ir_setkeytable(struct input_dev *dev, 283static int ir_setkeytable(struct ir_input_dev *ir_dev,
197 struct ir_scancode_table *to,
198 const struct ir_scancode_table *from) 284 const struct ir_scancode_table *from)
199{ 285{
200 struct ir_input_dev *ir_dev = input_get_drvdata(dev);
201 struct ir_scancode_table *rc_tab = &ir_dev->rc_tab; 286 struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
202 unsigned long flags; 287 unsigned int i, index;
203 unsigned int i; 288 int rc;
204 int rc = 0; 289
290 rc = ir_create_table(&ir_dev->rc_tab,
291 from->name, from->ir_type, from->size);
292 if (rc)
293 return rc;
294
295 IR_dprintk(1, "Allocated space for %u keycode entries (%u bytes)\n",
296 rc_tab->size, rc_tab->alloc);
205 297
206 spin_lock_irqsave(&rc_tab->lock, flags);
207 for (i = 0; i < from->size; i++) { 298 for (i = 0; i < from->size; i++) {
208 rc = ir_do_setkeycode(dev, to, from->scan[i].scancode, 299 index = ir_establish_scancode(ir_dev, rc_tab,
209 from->scan[i].keycode, false); 300 from->scan[i].scancode, false);
210 if (rc) 301 if (index >= rc_tab->len) {
302 rc = -ENOMEM;
211 break; 303 break;
304 }
305
306 ir_update_mapping(ir_dev->input_dev, rc_tab, index,
307 from->scan[i].keycode);
212 } 308 }
213 spin_unlock_irqrestore(&rc_tab->lock, flags); 309
310 if (rc)
311 ir_free_table(rc_tab);
312
214 return rc; 313 return rc;
215} 314}
216 315
217/** 316/**
317 * ir_lookup_by_scancode() - locate mapping by scancode
318 * @rc_tab: the &struct ir_scancode_table to search
319 * @scancode: scancode to look for in the table
320 * @return: index in the table, -1U if not found
321 *
322 * This routine performs binary search in RC keykeymap table for
323 * given scancode.
324 */
325static unsigned int ir_lookup_by_scancode(const struct ir_scancode_table *rc_tab,
326 unsigned int scancode)
327{
328 unsigned int start = 0;
329 unsigned int end = rc_tab->len - 1;
330 unsigned int mid;
331
332 while (start <= end) {
333 mid = (start + end) / 2;
334 if (rc_tab->scan[mid].scancode < scancode)
335 start = mid + 1;
336 else if (rc_tab->scan[mid].scancode > scancode)
337 end = mid - 1;
338 else
339 return mid;
340 }
341
342 return -1U;
343}
344
345/**
218 * ir_getkeycode() - get a keycode from the scancode->keycode table 346 * ir_getkeycode() - get a keycode from the scancode->keycode table
219 * @dev: the struct input_dev device descriptor 347 * @dev: the struct input_dev device descriptor
220 * @scancode: the desired scancode 348 * @scancode: the desired scancode
@@ -224,36 +352,46 @@ static int ir_setkeytable(struct input_dev *dev,
224 * This routine is used to handle evdev EVIOCGKEY ioctl. 352 * This routine is used to handle evdev EVIOCGKEY ioctl.
225 */ 353 */
226static int ir_getkeycode(struct input_dev *dev, 354static int ir_getkeycode(struct input_dev *dev,
227 unsigned int scancode, unsigned int *keycode) 355 struct input_keymap_entry *ke)
228{ 356{
229 int start, end, mid;
230 unsigned long flags;
231 int key = KEY_RESERVED;
232 struct ir_input_dev *ir_dev = input_get_drvdata(dev); 357 struct ir_input_dev *ir_dev = input_get_drvdata(dev);
233 struct ir_scancode_table *rc_tab = &ir_dev->rc_tab; 358 struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
359 struct ir_scancode *entry;
360 unsigned long flags;
361 unsigned int index;
362 unsigned int scancode;
363 int retval;
234 364
235 spin_lock_irqsave(&rc_tab->lock, flags); 365 spin_lock_irqsave(&rc_tab->lock, flags);
236 start = 0; 366
237 end = rc_tab->len - 1; 367 if (ke->flags & INPUT_KEYMAP_BY_INDEX) {
238 while (start <= end) { 368 index = ke->index;
239 mid = (start + end) / 2; 369 } else {
240 if (rc_tab->scan[mid].scancode < scancode) 370 retval = input_scancode_to_scalar(ke, &scancode);
241 start = mid + 1; 371 if (retval)
242 else if (rc_tab->scan[mid].scancode > scancode) 372 goto out;
243 end = mid - 1; 373
244 else { 374 index = ir_lookup_by_scancode(rc_tab, scancode);
245 key = rc_tab->scan[mid].keycode; 375 }
246 break; 376
247 } 377 if (index >= rc_tab->len) {
378 if (!(ke->flags & INPUT_KEYMAP_BY_INDEX))
379 IR_dprintk(1, "unknown key for scancode 0x%04x\n",
380 scancode);
381 retval = -EINVAL;
382 goto out;
248 } 383 }
249 spin_unlock_irqrestore(&rc_tab->lock, flags);
250 384
251 if (key == KEY_RESERVED) 385 entry = &rc_tab->scan[index];
252 IR_dprintk(1, "unknown key for scancode 0x%04x\n",
253 scancode);
254 386
255 *keycode = key; 387 ke->index = index;
256 return 0; 388 ke->keycode = entry->keycode;
389 ke->len = sizeof(entry->scancode);
390 memcpy(ke->scancode, &entry->scancode, sizeof(entry->scancode));
391
392out:
393 spin_unlock_irqrestore(&rc_tab->lock, flags);
394 return retval;
257} 395}
258 396
259/** 397/**
@@ -268,12 +406,24 @@ static int ir_getkeycode(struct input_dev *dev,
268 */ 406 */
269u32 ir_g_keycode_from_table(struct input_dev *dev, u32 scancode) 407u32 ir_g_keycode_from_table(struct input_dev *dev, u32 scancode)
270{ 408{
271 int keycode; 409 struct ir_input_dev *ir_dev = input_get_drvdata(dev);
410 struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
411 unsigned int keycode;
412 unsigned int index;
413 unsigned long flags;
414
415 spin_lock_irqsave(&rc_tab->lock, flags);
416
417 index = ir_lookup_by_scancode(rc_tab, scancode);
418 keycode = index < rc_tab->len ?
419 rc_tab->scan[index].keycode : KEY_RESERVED;
420
421 spin_unlock_irqrestore(&rc_tab->lock, flags);
272 422
273 ir_getkeycode(dev, scancode, &keycode);
274 if (keycode != KEY_RESERVED) 423 if (keycode != KEY_RESERVED)
275 IR_dprintk(1, "%s: scancode 0x%04x keycode 0x%02x\n", 424 IR_dprintk(1, "%s: scancode 0x%04x keycode 0x%02x\n",
276 dev->name, scancode, keycode); 425 dev->name, scancode, keycode);
426
277 return keycode; 427 return keycode;
278} 428}
279EXPORT_SYMBOL_GPL(ir_g_keycode_from_table); 429EXPORT_SYMBOL_GPL(ir_g_keycode_from_table);
@@ -453,8 +603,8 @@ int __ir_input_register(struct input_dev *input_dev,
453 goto out_dev; 603 goto out_dev;
454 } 604 }
455 605
456 input_dev->getkeycode = ir_getkeycode; 606 input_dev->getkeycode_new = ir_getkeycode;
457 input_dev->setkeycode = ir_setkeycode; 607 input_dev->setkeycode_new = ir_setkeycode;
458 input_set_drvdata(input_dev, ir_dev); 608 input_set_drvdata(input_dev, ir_dev);
459 ir_dev->input_dev = input_dev; 609 ir_dev->input_dev = input_dev;
460 610
@@ -462,12 +612,6 @@ int __ir_input_register(struct input_dev *input_dev,
462 spin_lock_init(&ir_dev->keylock); 612 spin_lock_init(&ir_dev->keylock);
463 setup_timer(&ir_dev->timer_keyup, ir_timer_keyup, (unsigned long)ir_dev); 613 setup_timer(&ir_dev->timer_keyup, ir_timer_keyup, (unsigned long)ir_dev);
464 614
465 ir_dev->rc_tab.name = rc_tab->name;
466 ir_dev->rc_tab.ir_type = rc_tab->ir_type;
467 ir_dev->rc_tab.alloc = roundup_pow_of_two(rc_tab->size *
468 sizeof(struct ir_scancode));
469 ir_dev->rc_tab.scan = kmalloc(ir_dev->rc_tab.alloc, GFP_KERNEL);
470 ir_dev->rc_tab.size = ir_dev->rc_tab.alloc / sizeof(struct ir_scancode);
471 if (props) { 615 if (props) {
472 ir_dev->props = props; 616 ir_dev->props = props;
473 if (props->open) 617 if (props->open)
@@ -476,23 +620,14 @@ int __ir_input_register(struct input_dev *input_dev,
476 input_dev->close = ir_close; 620 input_dev->close = ir_close;
477 } 621 }
478 622
479 if (!ir_dev->rc_tab.scan) {
480 rc = -ENOMEM;
481 goto out_name;
482 }
483
484 IR_dprintk(1, "Allocated space for %u keycode entries (%u bytes)\n",
485 ir_dev->rc_tab.size, ir_dev->rc_tab.alloc);
486
487 set_bit(EV_KEY, input_dev->evbit); 623 set_bit(EV_KEY, input_dev->evbit);
488 set_bit(EV_REP, input_dev->evbit); 624 set_bit(EV_REP, input_dev->evbit);
489 set_bit(EV_MSC, input_dev->evbit); 625 set_bit(EV_MSC, input_dev->evbit);
490 set_bit(MSC_SCAN, input_dev->mscbit); 626 set_bit(MSC_SCAN, input_dev->mscbit);
491 627
492 if (ir_setkeytable(input_dev, &ir_dev->rc_tab, rc_tab)) { 628 rc = ir_setkeytable(ir_dev, rc_tab);
493 rc = -ENOMEM; 629 if (rc)
494 goto out_table; 630 goto out_name;
495 }
496 631
497 rc = ir_register_class(input_dev); 632 rc = ir_register_class(input_dev);
498 if (rc < 0) 633 if (rc < 0)
@@ -522,7 +657,7 @@ int __ir_input_register(struct input_dev *input_dev,
522out_event: 657out_event:
523 ir_unregister_class(input_dev); 658 ir_unregister_class(input_dev);
524out_table: 659out_table:
525 kfree(ir_dev->rc_tab.scan); 660 ir_free_table(&ir_dev->rc_tab);
526out_name: 661out_name:
527 kfree(ir_dev->driver_name); 662 kfree(ir_dev->driver_name);
528out_dev: 663out_dev:
@@ -540,7 +675,6 @@ EXPORT_SYMBOL_GPL(__ir_input_register);
540void ir_input_unregister(struct input_dev *input_dev) 675void ir_input_unregister(struct input_dev *input_dev)
541{ 676{
542 struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); 677 struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
543 struct ir_scancode_table *rc_tab;
544 678
545 if (!ir_dev) 679 if (!ir_dev)
546 return; 680 return;
@@ -552,10 +686,7 @@ void ir_input_unregister(struct input_dev *input_dev)
552 if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) 686 if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW)
553 ir_raw_event_unregister(input_dev); 687 ir_raw_event_unregister(input_dev);
554 688
555 rc_tab = &ir_dev->rc_tab; 689 ir_free_table(&ir_dev->rc_tab);
556 rc_tab->size = 0;
557 kfree(rc_tab->scan);
558 rc_tab->scan = NULL;
559 690
560 ir_unregister_class(input_dev); 691 ir_unregister_class(input_dev);
561 692
diff --git a/drivers/media/IR/keymaps/rc-manli.c b/drivers/media/IR/keymaps/rc-manli.c
index 1e9fbfa90a1e..0f590b3d01c0 100644
--- a/drivers/media/IR/keymaps/rc-manli.c
+++ b/drivers/media/IR/keymaps/rc-manli.c
@@ -13,7 +13,6 @@
13#include <media/rc-map.h> 13#include <media/rc-map.h>
14 14
15/* Michael Tokarev <mjt@tls.msk.ru> 15/* Michael Tokarev <mjt@tls.msk.ru>
16 http://www.corpit.ru/mjt/beholdTV/remote_control.jpg
17 keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at 16 keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at
18 least, and probably other cards too. 17 least, and probably other cards too.
19 The "ascii-art picture" below (in comments, first row 18 The "ascii-art picture" below (in comments, first row
diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c
index 0acf6396e068..202581808bdc 100644
--- a/drivers/media/IR/lirc_dev.c
+++ b/drivers/media/IR/lirc_dev.c
@@ -27,7 +27,6 @@
27#include <linux/fs.h> 27#include <linux/fs.h>
28#include <linux/poll.h> 28#include <linux/poll.h>
29#include <linux/completion.h> 29#include <linux/completion.h>
30#include <linux/errno.h>
31#include <linux/mutex.h> 30#include <linux/mutex.h>
32#include <linux/wait.h> 31#include <linux/wait.h>
33#include <linux/unistd.h> 32#include <linux/unistd.h>
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 893fbc57c72f..a12b88f53ed9 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -26,7 +26,7 @@
26 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 26 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
27 * 27 *
28 * 28 *
29 * the project's page is at http://www.linuxtv.org/dvb/ 29 * the project's page is at http://www.linuxtv.org/
30 */ 30 */
31 31
32 32
@@ -2291,12 +2291,7 @@ static int frontend_init(struct av7110 *av7110)
2291/* Budgetpatch note: 2291/* Budgetpatch note:
2292 * Original hardware design by Roberto Deza: 2292 * Original hardware design by Roberto Deza:
2293 * There is a DVB_Wiki at 2293 * There is a DVB_Wiki at
2294 * http://212.227.36.83/linuxtv/wiki/index.php/Main_Page 2294 * http://www.linuxtv.org/
2295 * where is described this 'DVB TT Budget Patch', on Card Modding:
2296 * http://212.227.36.83/linuxtv/wiki/index.php/DVB_TT_Budget_Patch
2297 * On the short description there is also a link to a external file,
2298 * with more details:
2299 * http://perso.wanadoo.es/jesussolano/Ttf_tsc1.zip
2300 * 2295 *
2301 * New software triggering design by Emard that works on 2296 * New software triggering design by Emard that works on
2302 * original Roberto Deza's hardware: 2297 * original Roberto Deza's hardware:
diff --git a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c
index 6ef3996565ad..244d5d51f5f9 100644
--- a/drivers/media/dvb/ttpci/av7110_av.c
+++ b/drivers/media/dvb/ttpci/av7110_av.c
@@ -25,7 +25,7 @@
25 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 25 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
26 * 26 *
27 * 27 *
28 * the project's page is at http://www.linuxtv.org/dvb/ 28 * the project's page is at http://www.linuxtv.org/
29 */ 29 */
30 30
31#include <linux/types.h> 31#include <linux/types.h>
diff --git a/drivers/media/dvb/ttpci/av7110_ca.c b/drivers/media/dvb/ttpci/av7110_ca.c
index 43f61f2eca98..122c72806916 100644
--- a/drivers/media/dvb/ttpci/av7110_ca.c
+++ b/drivers/media/dvb/ttpci/av7110_ca.c
@@ -25,7 +25,7 @@
25 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 25 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
26 * 26 *
27 * 27 *
28 * the project's page is at http://www.linuxtv.org/dvb/ 28 * the project's page is at http://www.linuxtv.org/
29 */ 29 */
30 30
31#include <linux/kernel.h> 31#include <linux/kernel.h>
diff --git a/drivers/media/dvb/ttpci/av7110_hw.c b/drivers/media/dvb/ttpci/av7110_hw.c
index e162691b515d..f1cbfe526989 100644
--- a/drivers/media/dvb/ttpci/av7110_hw.c
+++ b/drivers/media/dvb/ttpci/av7110_hw.c
@@ -22,7 +22,7 @@
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 23 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
24 * 24 *
25 * the project's page is at http://www.linuxtv.org/dvb/ 25 * the project's page is at http://www.linuxtv.org/
26 */ 26 */
27 27
28/* for debugging ARM communication: */ 28/* for debugging ARM communication: */
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c
index 8986d967d2f4..ac20c5bbfa43 100644
--- a/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b/drivers/media/dvb/ttpci/av7110_v4l.c
@@ -22,7 +22,7 @@
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 23 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
24 * 24 *
25 * the project's page is at http://www.linuxtv.org/dvb/ 25 * the project's page is at http://www.linuxtv.org/
26 */ 26 */
27 27
28#include <linux/kernel.h> 28#include <linux/kernel.h>
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c
index 983672aa2450..97afc01f60d0 100644
--- a/drivers/media/dvb/ttpci/budget-av.c
+++ b/drivers/media/dvb/ttpci/budget-av.c
@@ -30,7 +30,7 @@
30 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 30 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
31 * 31 *
32 * 32 *
33 * the project's page is at http://www.linuxtv.org/dvb/ 33 * the project's page is at http://www.linuxtv.org/
34 */ 34 */
35 35
36#include "budget.h" 36#include "budget.h"
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index 13ac9e3ab121..a9c2c326df4b 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -26,7 +26,7 @@
26 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 26 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
27 * 27 *
28 * 28 *
29 * the project's page is at http://www.linuxtv.org/dvb/ 29 * the project's page is at http://www.linuxtv.org/
30 */ 30 */
31 31
32#include <linux/module.h> 32#include <linux/module.h>
diff --git a/drivers/media/dvb/ttpci/budget-core.c b/drivers/media/dvb/ttpci/budget-core.c
index ba18e56d5f11..054661315311 100644
--- a/drivers/media/dvb/ttpci/budget-core.c
+++ b/drivers/media/dvb/ttpci/budget-core.c
@@ -31,7 +31,7 @@
31 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 31 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
32 * 32 *
33 * 33 *
34 * the project's page is at http://www.linuxtv.org/dvb/ 34 * the project's page is at http://www.linuxtv.org/
35 */ 35 */
36 36
37 37
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c
index 9c92f9ddd223..579835590690 100644
--- a/drivers/media/dvb/ttpci/budget-patch.c
+++ b/drivers/media/dvb/ttpci/budget-patch.c
@@ -27,7 +27,7 @@
27 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 27 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
28 * 28 *
29 * 29 *
30 * the project's page is at http://www.linuxtv.org/dvb/ 30 * the project's page is at http://www.linuxtv.org/
31 */ 31 */
32 32
33#include "av7110.h" 33#include "av7110.h"
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c
index 874a10a9d493..d238fb9371a7 100644
--- a/drivers/media/dvb/ttpci/budget.c
+++ b/drivers/media/dvb/ttpci/budget.c
@@ -31,7 +31,7 @@
31 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 31 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
32 * 32 *
33 * 33 *
34 * the project's page is at http://www.linuxtv.org/dvb/ 34 * the project's page is at http://www.linuxtv.org/
35 */ 35 */
36 36
37#include "budget.h" 37#include "budget.h"
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c
index 4349213b403b..255d40df4b46 100644
--- a/drivers/media/radio/radio-maxiradio.c
+++ b/drivers/media/radio/radio-maxiradio.c
@@ -13,7 +13,7 @@
13 * anybody does please mail me. 13 * anybody does please mail me.
14 * 14 *
15 * For the pdf file see: 15 * For the pdf file see:
16 * http://www.semiconductors.philips.com/pip/TEA5757H/V1 16 * http://www.nxp.com/acrobat_download2/expired_datasheets/TEA5757_5759_3.pdf
17 * 17 *
18 * 18 *
19 * CHANGES: 19 * CHANGES:
diff --git a/drivers/media/radio/radio-typhoon.c b/drivers/media/radio/radio-typhoon.c
index 03439282dfce..b1f630527dc1 100644
--- a/drivers/media/radio/radio-typhoon.c
+++ b/drivers/media/radio/radio-typhoon.c
@@ -1,9 +1,6 @@
1/* Typhoon Radio Card driver for radio support 1/* Typhoon Radio Card driver for radio support
2 * (c) 1999 Dr. Henrik Seidel <Henrik.Seidel@gmx.de> 2 * (c) 1999 Dr. Henrik Seidel <Henrik.Seidel@gmx.de>
3 * 3 *
4 * Card manufacturer:
5 * http://194.18.155.92/idc/prod2.idc?nr=50753&lang=e
6 *
7 * Notes on the hardware 4 * Notes on the hardware
8 * 5 *
9 * This card has two output sockets, one for speakers and one for line. 6 * This card has two output sockets, one for speakers and one for line.
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index f6e4d0475351..d000522cb0f4 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -978,7 +978,7 @@ config USB_STKWEBCAM
978 Supported devices are typically found in some Asus laptops, 978 Supported devices are typically found in some Asus laptops,
979 with USB id 174f:a311 and 05e1:0501. Other Syntek cameras 979 with USB id 174f:a311 and 05e1:0501. Other Syntek cameras
980 may be supported by the stk11xx driver, from which this is 980 may be supported by the stk11xx driver, from which this is
981 derived, see http://stk11xx.sourceforge.net 981 derived, see <http://sourceforge.net/projects/syntekdriver/>
982 982
983 To compile this driver as a module, choose M here: the 983 To compile this driver as a module, choose M here: the
984 module will be called stkwebcam. 984 module will be called stkwebcam.
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index be35e6965829..9536f1a40dd2 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -4,7 +4,7 @@
4 * sensor. 4 * sensor.
5 * 5 *
6 * The data sheet for this device can be found at: 6 * The data sheet for this device can be found at:
7 * http://www.marvell.com/products/pcconn/88ALP01.jsp 7 * http://www.marvell.com/products/pc_connectivity/88alp01/
8 * 8 *
9 * Copyright 2006 One Laptop Per Child Association, Inc. 9 * Copyright 2006 One Laptop Per Child Association, Inc.
10 * Copyright 2006-7 Jonathan Corbet <corbet@lwn.net> 10 * Copyright 2006-7 Jonathan Corbet <corbet@lwn.net>
diff --git a/drivers/media/video/cx18/cx18-cards.c b/drivers/media/video/cx18/cx18-cards.c
index 6b805afe5d20..fe1090940b01 100644
--- a/drivers/media/video/cx18/cx18-cards.c
+++ b/drivers/media/video/cx18/cx18-cards.c
@@ -39,7 +39,7 @@ static struct cx18_card_tuner_i2c cx18_i2c_std = {
39 .tv = { 0x61, 0x60, I2C_CLIENT_END }, 39 .tv = { 0x61, 0x60, I2C_CLIENT_END },
40}; 40};
41 41
42/* Please add new PCI IDs to: http://pci-ids.ucw.cz/iii 42/* Please add new PCI IDs to: http://pci-ids.ucw.cz/
43 This keeps the PCI ID database up to date. Note that the entries 43 This keeps the PCI ID database up to date. Note that the entries
44 must be added under vendor 0x4444 (Conexant) as subsystem IDs. 44 must be added under vendor 0x4444 (Conexant) as subsystem IDs.
45 New vendor IDs should still be added to the vendor ID list. */ 45 New vendor IDs should still be added to the vendor ID list. */
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c
index abd64e89f60f..53a67824071b 100644
--- a/drivers/media/video/cx23885/cx23885-417.c
+++ b/drivers/media/video/cx23885/cx23885-417.c
@@ -7,7 +7,7 @@
7 * (c) 2008 Steven Toth <stoth@linuxtv.org> 7 * (c) 2008 Steven Toth <stoth@linuxtv.org>
8 * - CX23885/7/8 support 8 * - CX23885/7/8 support
9 * 9 *
10 * Includes parts from the ivtv driver( http://ivtv.sourceforge.net/), 10 * Includes parts from the ivtv driver <http://sourceforge.net/projects/ivtv/>
11 * 11 *
12 * This program is free software; you can redistribute it and/or modify 12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by 13 * it under the terms of the GNU General Public License as published by
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index e46e1ceef72c..660b2a927feb 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -9,7 +9,7 @@
9 * (c) 2005-2006 Mauro Carvalho Chehab <mchehab@infradead.org> 9 * (c) 2005-2006 Mauro Carvalho Chehab <mchehab@infradead.org>
10 * - video_ioctl2 conversion 10 * - video_ioctl2 conversion
11 * 11 *
12 * Includes parts from the ivtv driver( http://ivtv.sourceforge.net/), 12 * Includes parts from the ivtv driver <http://sourceforge.net/projects/ivtv/>
13 * 13 *
14 * This program is free software; you can redistribute it and/or modify 14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by 15 * it under the terms of the GNU General Public License as published by
diff --git a/drivers/media/video/ivtv/ivtv-cards.c b/drivers/media/video/ivtv/ivtv-cards.c
index ca1fd3227a93..87afbbee2063 100644
--- a/drivers/media/video/ivtv/ivtv-cards.c
+++ b/drivers/media/video/ivtv/ivtv-cards.c
@@ -65,7 +65,7 @@ static struct ivtv_card_tuner_i2c ivtv_i2c_tda8290 = {
65 65
66/********************** card configuration *******************************/ 66/********************** card configuration *******************************/
67 67
68/* Please add new PCI IDs to: http://pci-ids.ucw.cz/iii 68/* Please add new PCI IDs to: http://pci-ids.ucw.cz/
69 This keeps the PCI ID database up to date. Note that the entries 69 This keeps the PCI ID database up to date. Note that the entries
70 must be added under vendor 0x4444 (Conexant) as subsystem IDs. 70 must be added under vendor 0x4444 (Conexant) as subsystem IDs.
71 New vendor IDs should still be added to the vendor ID list. */ 71 New vendor IDs should still be added to the vendor ID list. */
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c
index ef0c8178f255..b1dbcf1d2bcb 100644
--- a/drivers/media/video/mxb.c
+++ b/drivers/media/video/mxb.c
@@ -3,7 +3,7 @@
3 3
4 Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de> 4 Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de>
5 5
6 Visit http://www.mihu.de/linux/saa7146/mxb/ 6 Visit http://www.themm.net/~mihu/linux/saa7146/mxb.html
7 for further details about this card. 7 for further details about this card.
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
diff --git a/drivers/media/video/sn9c102/sn9c102_pas202bcb.c b/drivers/media/video/sn9c102/sn9c102_pas202bcb.c
index 2782f94cf6f8..2e86fdc86989 100644
--- a/drivers/media/video/sn9c102/sn9c102_pas202bcb.c
+++ b/drivers/media/video/sn9c102/sn9c102_pas202bcb.c
@@ -4,7 +4,6 @@
4 * * 4 * *
5 * Copyright (C) 2004 by Carlos Eduardo Medaglia Dyonisio * 5 * Copyright (C) 2004 by Carlos Eduardo Medaglia Dyonisio *
6 * <medaglia@undl.org.br> * 6 * <medaglia@undl.org.br> *
7 * http://cadu.homelinux.com:8080/ *
8 * * 7 * *
9 * Support for SN9C103, DAC Magnitude, exposure and green gain controls * 8 * Support for SN9C103, DAC Magnitude, exposure and green gain controls *
10 * added by Luca Risolia <luca.risolia@studio.unibo.it> * 9 * added by Luca Risolia <luca.risolia@studio.unibo.it> *
diff --git a/drivers/media/video/zoran/videocodec.h b/drivers/media/video/zoran/videocodec.h
index 5c27b251354e..b654bfff8740 100644
--- a/drivers/media/video/zoran/videocodec.h
+++ b/drivers/media/video/zoran/videocodec.h
@@ -56,7 +56,7 @@
56 the slave is bound to it). Otherwise it doesn't need this functions and 56 the slave is bound to it). Otherwise it doesn't need this functions and
57 therfor they may not be initialized. 57 therfor they may not be initialized.
58 58
59 The other fuctions are just for convenience, as they are for sure used by 59 The other functions are just for convenience, as they are for sure used by
60 most/all of the codecs. The last ones may be ommited, too. 60 most/all of the codecs. The last ones may be ommited, too.
61 61
62 See the structure declaration below for more information and which data has 62 See the structure declaration below for more information and which data has
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c
index 6f89d0a096ea..3c471a4e3e4a 100644
--- a/drivers/media/video/zoran/zoran_driver.c
+++ b/drivers/media/video/zoran/zoran_driver.c
@@ -1177,7 +1177,7 @@ static int setup_window(struct zoran_fh *fh, int x, int y, int width, int height
1177 if (height > BUZ_MAX_HEIGHT) 1177 if (height > BUZ_MAX_HEIGHT)
1178 height = BUZ_MAX_HEIGHT; 1178 height = BUZ_MAX_HEIGHT;
1179 1179
1180 /* Check for vaild parameters */ 1180 /* Check for invalid parameters */
1181 if (width < BUZ_MIN_WIDTH || height < BUZ_MIN_HEIGHT || 1181 if (width < BUZ_MIN_WIDTH || height < BUZ_MIN_HEIGHT ||
1182 width > BUZ_MAX_WIDTH || height > BUZ_MAX_HEIGHT) { 1182 width > BUZ_MAX_WIDTH || height > BUZ_MAX_HEIGHT) {
1183 dprintk(1, 1183 dprintk(1,