[media] em28xx: tuner setup is broken after algo_data change
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 22 Mar 2013 12:54:00 +0000 (09:54 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 22 Mar 2013 16:21:10 +0000 (13:21 -0300)
Commit aab3125c43d8fecc7134e5f1e729fabf4dd196da broke em28xx. I traced
this eventually to the change in what algo_data points to. This pointer
is also passed to em28xx_tuner_callback() through several hidden tuner
layers (yuck!) and that callback was not updated.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/em28xx/em28xx-cards.c

index 46fff5c3335b297ddec7049073af8a7041712e25..cb7cdd32270262f7b6d4685d541e873e8bdb2f85 100644 (file)
@@ -2229,8 +2229,9 @@ static unsigned short msp3400_addrs[] = {
 
 int em28xx_tuner_callback(void *ptr, int component, int command, int arg)
 {
+       struct em28xx_i2c_bus *i2c_bus = ptr;
+       struct em28xx *dev = i2c_bus->dev;
        int rc = 0;
-       struct em28xx *dev = ptr;
 
        if (dev->tuner_type != TUNER_XC2028 && dev->tuner_type != TUNER_XC5000)
                return 0;