Re: [PATCH] smsdvb - fix UNDEFINED delivery on driver hotplug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em 01-03-2012 07:06, Mauro Carvalho Chehab escreveu:
> Em 20-02-2012 09:59, Gianluca Gennari escreveu:
>> Il 14/02/2012 23:35, Eddi De Pieri ha scritto:
>>> Someone can confirm my changes?
>>>
>>> Regards,
>>>
>>> Eddi
>>
>> Hi Eddi,
>> your patch makes sense to me, but I think you will have to resubmit it
>> to the list, as the original mail has never been published (I can only
>> see your reply to it). Also, your patch is not listed on patchwork, so
>> it must have been lost.
> 
> Yes, you should re-submit it. Please be sure that your emailer won't mangle
> it, as otherwise patchwork won't catch it.

After looking on your patch, I think that the best fix is the patch below.
Instead of changing the fe_ops template, we should modify the per-client
copy.

Regards,
Mauro

-

smsusb: fix the default delivery system setting

There are two issues on the default delivery system setting for smsusb:

	1) instead of filling the delivery system for the per-client
	   frontend.ops, it were changing the global structure;

	2) The client->frontend.ops copy were keeping the previous value
	   of the template. So, the first time the device was inserted,
	   it was using the wrong value.

Reported-by: Eddi De Pieri <eddi@xxxxxxxxxxx>
Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>

diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c
index 654685c..e2dc80d 100644
--- a/drivers/media/dvb/siano/smsdvb.c
+++ b/drivers/media/dvb/siano/smsdvb.c
@@ -872,11 +872,11 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev,
 	switch (smscore_get_device_mode(coredev)) {
 	case DEVICE_MODE_DVBT:
 	case DEVICE_MODE_DVBT_BDA:
-		smsdvb_fe_ops.delsys[0] = SYS_DVBT;
+		client->frontend.ops.delsys[0] = SYS_DVBT;
 		break;
 	case DEVICE_MODE_ISDBT:
 	case DEVICE_MODE_ISDBT_BDA:
-		smsdvb_fe_ops.delsys[0] = SYS_ISDBT;
+		client->frontend.ops.delsys[0] = SYS_ISDBT;
 		break;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux