diff options
author | Jarod Wilson <jarod@redhat.com> | 2010-10-23 15:42:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-23 15:48:37 -0400 |
commit | 6aa209e41fd51d3ade96e1550d9b514a07ebd8f1 (patch) | |
tree | 9dee04fd45ef940b3127f40cd9e97f31531e006f /drivers/media | |
parent | 428cc7633dedbab05aab80b805d8585572dc6dbf (diff) |
[media] imon: remove redundant change_protocol call
There was a redundant call to imon_ir_change_protocol -- its already
getting called from ir_input_register. Also do some minor housekeeping
with var names and formatting.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/IR/imon.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c index bcb282672efa..b4d489deadc3 100644 --- a/drivers/media/IR/imon.c +++ b/drivers/media/IR/imon.c | |||
@@ -315,7 +315,7 @@ MODULE_DEVICE_TABLE(usb, imon_usb_id_table); | |||
315 | 315 | ||
316 | static bool debug; | 316 | static bool debug; |
317 | module_param(debug, bool, S_IRUGO | S_IWUSR); | 317 | module_param(debug, bool, S_IRUGO | S_IWUSR); |
318 | MODULE_PARM_DESC(debug, "Debug messages: 0=no, 1=yes(default: no)"); | 318 | MODULE_PARM_DESC(debug, "Debug messages: 0=no, 1=yes (default: no)"); |
319 | 319 | ||
320 | /* lcd, vfd, vga or none? should be auto-detected, but can be overridden... */ | 320 | /* lcd, vfd, vga or none? should be auto-detected, but can be overridden... */ |
321 | static int display_type; | 321 | static int display_type; |
@@ -784,7 +784,7 @@ static struct attribute *imon_display_sysfs_entries[] = { | |||
784 | NULL | 784 | NULL |
785 | }; | 785 | }; |
786 | 786 | ||
787 | static struct attribute_group imon_display_attribute_group = { | 787 | static struct attribute_group imon_display_attr_group = { |
788 | .attrs = imon_display_sysfs_entries | 788 | .attrs = imon_display_sysfs_entries |
789 | }; | 789 | }; |
790 | 790 | ||
@@ -793,7 +793,7 @@ static struct attribute *imon_rf_sysfs_entries[] = { | |||
793 | NULL | 793 | NULL |
794 | }; | 794 | }; |
795 | 795 | ||
796 | static struct attribute_group imon_rf_attribute_group = { | 796 | static struct attribute_group imon_rf_attr_group = { |
797 | .attrs = imon_rf_sysfs_entries | 797 | .attrs = imon_rf_sysfs_entries |
798 | }; | 798 | }; |
799 | 799 | ||
@@ -2238,8 +2238,7 @@ static void imon_init_display(struct imon_context *ictx, | |||
2238 | dev_dbg(ictx->dev, "Registering iMON display with sysfs\n"); | 2238 | dev_dbg(ictx->dev, "Registering iMON display with sysfs\n"); |
2239 | 2239 | ||
2240 | /* set up sysfs entry for built-in clock */ | 2240 | /* set up sysfs entry for built-in clock */ |
2241 | ret = sysfs_create_group(&intf->dev.kobj, | 2241 | ret = sysfs_create_group(&intf->dev.kobj, &imon_display_attr_group); |
2242 | &imon_display_attribute_group); | ||
2243 | if (ret) | 2242 | if (ret) |
2244 | dev_err(ictx->dev, "Could not create display sysfs " | 2243 | dev_err(ictx->dev, "Could not create display sysfs " |
2245 | "entries(%d)", ret); | 2244 | "entries(%d)", ret); |
@@ -2312,7 +2311,7 @@ static int __devinit imon_probe(struct usb_interface *interface, | |||
2312 | if (ifnum == 0) { | 2311 | if (ifnum == 0) { |
2313 | if (product == 0xffdc && ictx->rf_device) { | 2312 | if (product == 0xffdc && ictx->rf_device) { |
2314 | sysfs_err = sysfs_create_group(&interface->dev.kobj, | 2313 | sysfs_err = sysfs_create_group(&interface->dev.kobj, |
2315 | &imon_rf_attribute_group); | 2314 | &imon_rf_attr_group); |
2316 | if (sysfs_err) | 2315 | if (sysfs_err) |
2317 | pr_err("Could not create RF sysfs entries(%d)\n", | 2316 | pr_err("Could not create RF sysfs entries(%d)\n", |
2318 | sysfs_err); | 2317 | sysfs_err); |
@@ -2322,14 +2321,6 @@ static int __devinit imon_probe(struct usb_interface *interface, | |||
2322 | imon_init_display(ictx, interface); | 2321 | imon_init_display(ictx, interface); |
2323 | } | 2322 | } |
2324 | 2323 | ||
2325 | /* set IR protocol/remote type */ | ||
2326 | ret = imon_ir_change_protocol(ictx, ictx->ir_type); | ||
2327 | if (ret) { | ||
2328 | dev_warn(dev, "%s: failed to set IR protocol, falling back " | ||
2329 | "to standard iMON protocol mode\n", __func__); | ||
2330 | ictx->ir_type = IR_TYPE_OTHER; | ||
2331 | } | ||
2332 | |||
2333 | dev_info(dev, "iMON device (%04x:%04x, intf%d) on " | 2324 | dev_info(dev, "iMON device (%04x:%04x, intf%d) on " |
2334 | "usb<%d:%d> initialized\n", vendor, product, ifnum, | 2325 | "usb<%d:%d> initialized\n", vendor, product, ifnum, |
2335 | usbdev->bus->busnum, usbdev->devnum); | 2326 | usbdev->bus->busnum, usbdev->devnum); |
@@ -2368,10 +2359,8 @@ static void __devexit imon_disconnect(struct usb_interface *interface) | |||
2368 | * sysfs_remove_group is safe to call even if sysfs_create_group | 2359 | * sysfs_remove_group is safe to call even if sysfs_create_group |
2369 | * hasn't been called | 2360 | * hasn't been called |
2370 | */ | 2361 | */ |
2371 | sysfs_remove_group(&interface->dev.kobj, | 2362 | sysfs_remove_group(&interface->dev.kobj, &imon_display_attr_group); |
2372 | &imon_display_attribute_group); | 2363 | sysfs_remove_group(&interface->dev.kobj, &imon_rf_attr_group); |
2373 | sysfs_remove_group(&interface->dev.kobj, | ||
2374 | &imon_rf_attribute_group); | ||
2375 | 2364 | ||
2376 | usb_set_intfdata(interface, NULL); | 2365 | usb_set_intfdata(interface, NULL); |
2377 | 2366 | ||