Commit 482371ff authored by Petr Vandrovec's avatar Petr Vandrovec

Remove structure holding state of secondary output in the matroxfb driver.

We do not have any state stored here.
parent ce31e58a
...@@ -20,20 +20,16 @@ ...@@ -20,20 +20,16 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
static int matroxfb_g450_compute(void* md, struct my_timming* mt) { static int matroxfb_g450_compute(void* md, struct my_timming* mt) {
#define m2info ((struct matroxfb_g450_info*)md) #define minfo ((struct matrox_fb_info*)md)
#define minfo (m2info->primary_dev)
ACCESS_FBINFO(hw).vidclk = mt->pixclock; ACCESS_FBINFO(hw).vidclk = mt->pixclock;
#undef minfo #undef minfo
#undef m2info
return 0; return 0;
} }
static int matroxfb_g450_program(void* md) { static int matroxfb_g450_program(void* md) {
#define m2info ((struct matroxfb_g450_info*)md) #define minfo ((struct matrox_fb_info*)md)
#define minfo (m2info->primary_dev)
matroxfb_g450_setclk(PMINFO ACCESS_FBINFO(hw).vidclk, M_VIDEO_PLL); matroxfb_g450_setclk(PMINFO ACCESS_FBINFO(hw).vidclk, M_VIDEO_PLL);
#undef minfo #undef minfo
#undef m2info
return 0; return 0;
} }
...@@ -72,20 +68,11 @@ static struct matrox_altout matroxfb_g450_altout = { ...@@ -72,20 +68,11 @@ static struct matrox_altout matroxfb_g450_altout = {
}; };
void matroxfb_g450_connect(WPMINFO2) { void matroxfb_g450_connect(WPMINFO2) {
struct matroxfb_g450_info* m2info;
/* hardware is not G450... */ /* hardware is not G450... */
if (!ACCESS_FBINFO(devflags.g450dac)) if (!ACCESS_FBINFO(devflags.g450dac))
return; return;
m2info = (struct matroxfb_g450_info*)kmalloc(sizeof(*m2info), GFP_KERNEL);
if (!m2info) {
printk(KERN_ERR "matroxfb_g450: Not enough memory for G450 DAC control structs\n");
return;
}
memset(m2info, 0, sizeof(*m2info));
down_write(&ACCESS_FBINFO(altout.lock)); down_write(&ACCESS_FBINFO(altout.lock));
m2info->primary_dev = MINFO; ACCESS_FBINFO(altout.device) = MINFO;
ACCESS_FBINFO(altout.device) = m2info;
ACCESS_FBINFO(altout.output) = &matroxfb_g450_altout; ACCESS_FBINFO(altout.output) = &matroxfb_g450_altout;
up_write(&ACCESS_FBINFO(altout.lock)); up_write(&ACCESS_FBINFO(altout.lock));
ACCESS_FBINFO(output.all) |= MATROXFB_OUTPUT_CONN_SECONDARY; ACCESS_FBINFO(output.all) |= MATROXFB_OUTPUT_CONN_SECONDARY;
...@@ -97,7 +84,6 @@ void matroxfb_g450_shutdown(WPMINFO2) { ...@@ -97,7 +84,6 @@ void matroxfb_g450_shutdown(WPMINFO2) {
ACCESS_FBINFO(output.ph) &= ~MATROXFB_OUTPUT_CONN_SECONDARY; ACCESS_FBINFO(output.ph) &= ~MATROXFB_OUTPUT_CONN_SECONDARY;
ACCESS_FBINFO(output.sh) &= ~MATROXFB_OUTPUT_CONN_SECONDARY; ACCESS_FBINFO(output.sh) &= ~MATROXFB_OUTPUT_CONN_SECONDARY;
down_write(&ACCESS_FBINFO(altout.lock)); down_write(&ACCESS_FBINFO(altout.lock));
kfree(ACCESS_FBINFO(altout.device));
ACCESS_FBINFO(altout.device) = NULL; ACCESS_FBINFO(altout.device) = NULL;
ACCESS_FBINFO(altout.output) = NULL; ACCESS_FBINFO(altout.output) = NULL;
up_write(&ACCESS_FBINFO(altout.lock)); up_write(&ACCESS_FBINFO(altout.lock));
......
...@@ -3,11 +3,6 @@ ...@@ -3,11 +3,6 @@
#include "matroxfb_base.h" #include "matroxfb_base.h"
struct matroxfb_g450_info {
struct matrox_fb_info* primary_dev;
unsigned int timmings;
};
#ifdef CONFIG_FB_MATROX_G450 #ifdef CONFIG_FB_MATROX_G450
void matroxfb_g450_connect(WPMINFO2); void matroxfb_g450_connect(WPMINFO2);
void matroxfb_g450_shutdown(WPMINFO2); void matroxfb_g450_shutdown(WPMINFO2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment