Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 471 → Rev 472

/shark/trunk/drivers/fb/fbmem.c
962,7 → 962,7
return fb_set_cmap(&cmap, 1, info);
}
 
static int
int
fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
{
1325,7 → 1325,10
linuxcomp_setfd(i,num);
fb_open(i,NULL);
if (fb_open(i,NULL)) {
kfree(i);
return -1;
}
 
kfree(i);
1342,7 → 1345,10
 
linuxcomp_setfd(i,num);
 
fb_release(i,NULL);
if(fb_release(i,NULL)) {
kfree(i);
return -1;
}
 
kfree(i);
 
1350,6 → 1356,39
 
}
 
int fb_set_mode_inode(int num, int wx, int wy, int bpp) {
 
struct inode *i;
struct fb_var_screeninfo var;
 
i = (struct inode *)kmalloc(sizeof(struct inode),GFP_KERNEL);
 
linuxcomp_setfd(i,num);
 
if (fb_ioctl(i, NULL, FBIOGET_VSCREENINFO, (unsigned long)&var)) {
kfree(i);
return -1;
}
 
var.xres = wx;
var.yres = wy;
var.xres_virtual = wx;
var.yres_virtual = wy;
var.xoffset = 0;
var.yoffset = 0;
var.bits_per_pixel = bpp;
 
if (fb_ioctl(i, NULL, FBIOPUT_VSCREENINFO, (unsigned long)&var)) {
kfree(i);
return -1;
}
 
kfree(i);
 
return 0;
}
 
/**
* video_setup - process command line options
* @options: string of options