diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-13 20:55:15 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-13 20:55:15 +0000 |
commit | 1471f525455788c20b130690e0f104df451aeb43 (patch) | |
tree | 3778beba56558beb9a9548ea5b467e9c44ea966f /drivers/video/matrox | |
parent | e80d2c5456d30ebba5b0eb8a9d33e17d815d4d83 (diff) |
Merge with Linux 2.3.51.
Diffstat (limited to 'drivers/video/matrox')
-rw-r--r-- | drivers/video/matrox/i2c-matroxfb.c | 3 | ||||
-rw-r--r-- | drivers/video/matrox/matroxfb_maven.c | 5 | ||||
-rw-r--r-- | drivers/video/matrox/matroxfb_maven.h | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/matrox/i2c-matroxfb.c b/drivers/video/matrox/i2c-matroxfb.c index bbb695223..b92ce4055 100644 --- a/drivers/video/matrox/i2c-matroxfb.c +++ b/drivers/video/matrox/i2c-matroxfb.c @@ -287,6 +287,9 @@ static void* i2c_matroxfb_probe(struct matrox_fb_info* minfo) { matroxfb_DAC_unlock_irqrestore(flags); memset(m2info, 0, sizeof(*m2info)); + m2info->maven.minfo = m2info; + m2info->ddc1.minfo = m2info; + m2info->ddc2.minfo = m2info; m2info->primary_dev = minfo; if (ACCESS_FBINFO(devflags.accelerator) == FB_ACCEL_MATROX_MGA2064W || diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c index 978dba156..e7d515ec2 100644 --- a/drivers/video/matrox/matroxfb_maven.c +++ b/drivers/video/matrox/matroxfb_maven.c @@ -892,11 +892,8 @@ static struct matrox_altout maven_altout = { static int maven_init_client(struct i2c_client* clnt) { struct i2c_adapter* a = clnt->adapter; - /* data are set to primary head... maybe I should change it */ - struct matroxfb_dh_maven_info* m2info = - (struct matroxfb_dh_maven_info*)(((u_int8_t*)a) - offsetof(struct matroxfb_dh_maven_info, maven.adapter)); + struct matroxfb_dh_maven_info* m2info = ((struct i2c_bit_adapter*)a)->minfo; struct maven_data* md = clnt->data; - /* add some checks that m2info is matroxfb_dh_fb_info here... */ struct matrox_fb_info* minfo = m2info->primary_dev; md->mode = MODE_MONITOR; diff --git a/drivers/video/matrox/matroxfb_maven.h b/drivers/video/matrox/matroxfb_maven.h index cbf340e0a..060aa0b81 100644 --- a/drivers/video/matrox/matroxfb_maven.h +++ b/drivers/video/matrox/matroxfb_maven.h @@ -6,10 +6,13 @@ #include <linux/i2c-algo-bit.h> #include "matroxfb_base.h" +struct matroxfb_dh_maven_info; + struct i2c_bit_adapter { struct i2c_adapter adapter; int initialized; struct i2c_algo_bit_data bac; + struct matroxfb_dh_maven_info *minfo; }; struct matroxfb_dh_maven_info { |