From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Thu, 1 Mar 2012 10:25:39 +0000 (-0300)
Subject: [media] smsusb: fix the default delivery system setting
X-Git-Tag: firefly_0821_release~3680^2~2904^2~28
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9bd58e77e656abe08f3f781d982bc9e29167e1c3;p=firefly-linux-kernel-4.4.55.git

[media] 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@depieri.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---

diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c
index 654685c9303e..e2dc80da82cc 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;
 	}