diff mbox

[4/3,media] siano: Use the default firmware for Stellar

Message ID 1379016247-19744-1-git-send-email-m.chehab@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab Sept. 12, 2013, 8:04 p.m. UTC
The Stellar firmware load routine is different. Improve it to use
the default firmware, if no modprobe parameter tells otherwise.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
---
 drivers/media/usb/siano/smsusb.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

André Roth Sept. 12, 2013, 11:33 p.m. UTC | #1
On Thu, 12 Sep 2013 17:04:07 -0300
Mauro Carvalho Chehab <m.chehab@samsung.com> wrote:

Tested-by: André Roth <neolynx@gmail.com>


> The Stellar firmware load routine is different. Improve it to use
> the default firmware, if no modprobe parameter tells otherwise.
> 
> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
> ---
>  drivers/media/usb/siano/smsusb.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c
> index 33f3575..05bd91a 100644
> --- a/drivers/media/usb/siano/smsusb.c
> +++ b/drivers/media/usb/siano/smsusb.c
> @@ -245,6 +245,9 @@ static int smsusb1_load_firmware(struct usb_device *udev, int id, int board_id)
>  	int rc, dummy;
>  	char *fw_filename;
>  
> +	if (id < 0)
> +		id = sms_get_board(board_id)->default_mode;
> +
>  	if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) {
>  		sms_err("invalid firmware id specified %d", id);
>  		return -EINVAL;
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c
index 33f3575..05bd91a 100644
--- a/drivers/media/usb/siano/smsusb.c
+++ b/drivers/media/usb/siano/smsusb.c
@@ -245,6 +245,9 @@  static int smsusb1_load_firmware(struct usb_device *udev, int id, int board_id)
 	int rc, dummy;
 	char *fw_filename;
 
+	if (id < 0)
+		id = sms_get_board(board_id)->default_mode;
+
 	if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) {
 		sms_err("invalid firmware id specified %d", id);
 		return -EINVAL;