aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2011-02-13 18:12:15 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 06:26:14 -0400
commit30bd3b56db37a2c2eb6d3bb14ce02156807c79ed (patch)
tree522de6707878cf7f12a3148d93eaad00b6351906
parent61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff)
[media] DM04/QQBOX Fix issue with firmware release and cold reset
Fix issue where firmware does not release on cold reset. Also, default firmware never cold resets in multi tuner environment. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/dvb-usb/lmedm04.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/dvb/dvb-usb/lmedm04.c b/drivers/media/dvb/dvb-usb/lmedm04.c
index f2db01212ca1..3c521db0a130 100644
--- a/drivers/media/dvb/dvb-usb/lmedm04.c
+++ b/drivers/media/dvb/dvb-usb/lmedm04.c
@@ -747,7 +747,7 @@ static int lme_firmware_switch(struct usb_device *udev, int cold)
747 fw_lme = fw_s0194; 747 fw_lme = fw_s0194;
748 ret = request_firmware(&fw, fw_lme, &udev->dev); 748 ret = request_firmware(&fw, fw_lme, &udev->dev);
749 if (ret == 0) { 749 if (ret == 0) {
750 cold = 0;/*lme2510-s0194 cannot cold reset*/ 750 cold = 0;
751 break; 751 break;
752 } 752 }
753 dvb_usb_lme2510_firmware = TUNER_LG; 753 dvb_usb_lme2510_firmware = TUNER_LG;
@@ -769,8 +769,10 @@ static int lme_firmware_switch(struct usb_device *udev, int cold)
769 case TUNER_S7395: 769 case TUNER_S7395:
770 fw_lme = fw_c_s7395; 770 fw_lme = fw_c_s7395;
771 ret = request_firmware(&fw, fw_lme, &udev->dev); 771 ret = request_firmware(&fw, fw_lme, &udev->dev);
772 if (ret == 0) 772 if (ret == 0) {
773 cold = 0;
773 break; 774 break;
775 }
774 dvb_usb_lme2510_firmware = TUNER_LG; 776 dvb_usb_lme2510_firmware = TUNER_LG;
775 case TUNER_LG: 777 case TUNER_LG:
776 fw_lme = fw_c_lg; 778 fw_lme = fw_c_lg;
@@ -796,14 +798,14 @@ static int lme_firmware_switch(struct usb_device *udev, int cold)
796 ret = lme2510_download_firmware(udev, fw); 798 ret = lme2510_download_firmware(udev, fw);
797 } 799 }
798 800
801 release_firmware(fw);
802
799 if (cold) { 803 if (cold) {
800 info("FRM Changing to %s firmware", fw_lme); 804 info("FRM Changing to %s firmware", fw_lme);
801 lme_coldreset(udev); 805 lme_coldreset(udev);
802 return -ENODEV; 806 return -ENODEV;
803 } 807 }
804 808
805 release_firmware(fw);
806
807 return ret; 809 return ret;
808} 810}
809 811
@@ -1220,5 +1222,5 @@ module_exit(lme2510_module_exit);
1220 1222
1221MODULE_AUTHOR("Malcolm Priestley <tvboxspy@gmail.com>"); 1223MODULE_AUTHOR("Malcolm Priestley <tvboxspy@gmail.com>");
1222MODULE_DESCRIPTION("LME2510(C) DVB-S USB2.0"); 1224MODULE_DESCRIPTION("LME2510(C) DVB-S USB2.0");
1223MODULE_VERSION("1.80"); 1225MODULE_VERSION("1.81");
1224MODULE_LICENSE("GPL"); 1226MODULE_LICENSE("GPL");