]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] af9035: relax frontend callback error handling
authorAntti Palosaari <crope@iki.fi>
Wed, 12 Sep 2012 01:27:06 +0000 (22:27 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 23 Sep 2012 22:41:17 +0000 (19:41 -0300)
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>
drivers/media/usb/dvb-usb-v2/af9035.c

index b7004441ac2a8034f34713017000455f34b0bea9..fdec3b1a186b544893b5343f38157d48e19fe111 100644 (file)
@@ -652,7 +652,7 @@ static int af9035_tuner_callback(struct dvb_usb_device *d, int cmd, int arg)
                break;
        }
 
-       return -ENODEV;
+       return 0;
 }
 
 static int af9035_frontend_callback(void *adapter_priv, int component,
@@ -661,6 +661,9 @@ static int af9035_frontend_callback(void *adapter_priv, int component,
        struct i2c_adapter *adap = adapter_priv;
        struct dvb_usb_device *d = i2c_get_adapdata(adap);
 
+       dev_dbg(&d->udev->dev, "%s: component=%d cmd=%d arg=%d\n",
+                       __func__, component, cmd, arg);
+
        switch (component) {
        case DVB_FRONTEND_COMPONENT_TUNER:
                return af9035_tuner_callback(d, cmd, arg);
@@ -668,7 +671,7 @@ static int af9035_frontend_callback(void *adapter_priv, int component,
                break;
        }
 
-       return -EINVAL;
+       return 0;
 }
 
 static int af9035_frontend_attach(struct dvb_usb_adapter *adap)