aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-09-11 21:27:06 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-23 18:41:17 -0400
commit1835af1003655ab89fd78fc8e8fe69f4e5dcc465 (patch)
treee317196e8a93d46ce0057adba0018d8519598e3c /drivers/media/usb
parentee1cdd507a73303c0794fa7ed654822bb2bec259 (diff)
[media] af9035: relax frontend callback error handling
It is not good idea to return error for missing callback handler as whole callback as optional and could be missing by intentionally. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/dvb-usb-v2/af9035.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c
index b7004441ac2a..fdec3b1a186b 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.c
+++ b/drivers/media/usb/dvb-usb-v2/af9035.c
@@ -652,7 +652,7 @@ static int af9035_tuner_callback(struct dvb_usb_device *d, int cmd, int arg)
652 break; 652 break;
653 } 653 }
654 654
655 return -ENODEV; 655 return 0;
656} 656}
657 657
658static int af9035_frontend_callback(void *adapter_priv, int component, 658static int af9035_frontend_callback(void *adapter_priv, int component,
@@ -661,6 +661,9 @@ static int af9035_frontend_callback(void *adapter_priv, int component,
661 struct i2c_adapter *adap = adapter_priv; 661 struct i2c_adapter *adap = adapter_priv;
662 struct dvb_usb_device *d = i2c_get_adapdata(adap); 662 struct dvb_usb_device *d = i2c_get_adapdata(adap);
663 663
664 dev_dbg(&d->udev->dev, "%s: component=%d cmd=%d arg=%d\n",
665 __func__, component, cmd, arg);
666
664 switch (component) { 667 switch (component) {
665 case DVB_FRONTEND_COMPONENT_TUNER: 668 case DVB_FRONTEND_COMPONENT_TUNER:
666 return af9035_tuner_callback(d, cmd, arg); 669 return af9035_tuner_callback(d, cmd, arg);
@@ -668,7 +671,7 @@ static int af9035_frontend_callback(void *adapter_priv, int component,
668 break; 671 break;
669 } 672 }
670 673
671 return -EINVAL; 674 return 0;
672} 675}
673 676
674static int af9035_frontend_attach(struct dvb_usb_adapter *adap) 677static int af9035_frontend_attach(struct dvb_usb_adapter *adap)