[media] dib7000p: setup dev.parent for i2c master built into 7000p
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Mon, 20 Jul 2009 03:45:25 +0000 (00:45 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:52:28 +0000 (17:52 -0300)
We need to set the dev.parent member on the dib7000p on its i2c master, or
else calls to request_firmware() will hit an oops in 2.6.31.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/dib7000p.c

index 0c9f40c2a251fbaad72fe3520e6f6ec48d76cb13..a64a538ba36439b5723650905f434d8fba8ae58b 100644 (file)
@@ -2336,6 +2336,11 @@ struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr,
                request_firmware() will hit an OOPS (this should be moved somewhere
                more common) */
 
+       /* FIXME: make sure the dev.parent field is initialized, or else
+          request_firmware() will hit an OOPS (this should be moved somewhere
+          more common) */
+       st->i2c_master.gated_tuner_i2c_adap.dev.parent = i2c_adap->dev.parent;
+
        dibx000_init_i2c_master(&st->i2c_master, DIB7000P, st->i2c_adap, st->i2c_addr);
 
        /* init 7090 tuner adapter */