V4L/DVB (8945): mxb: use unique i2c adapter name
authorHans Verkuil <hverkuil@xs4all.nl>
Sun, 7 Sep 2008 11:32:44 +0000 (08:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Oct 2008 11:37:00 +0000 (09:37 -0200)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/mxb.c

index b2dae5062e65cf1ff1974a99b459406ddbc34efa..7f130284b5c730a0573bcc0c10c9cd925cb5dfec 100644 (file)
@@ -215,9 +215,10 @@ static int mxb_probe(struct saa7146_dev* dev)
 
        mxb->i2c_adapter = (struct i2c_adapter) {
                .class = I2C_CLASS_TV_ANALOG,
-               .name = "mxb",
        };
 
+       snprintf(mxb->i2c_adapter.name, sizeof(mxb->i2c_adapter.name), "mxb%d", mxb_num);
+
        saa7146_i2c_adapter_prepare(dev, &mxb->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480);
        if(i2c_add_adapter(&mxb->i2c_adapter) < 0) {
                DEB_S(("cannot register i2c-device. skipping.\n"));