Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17634
b: refs/heads/master
c: 313e58a
h: refs/heads/master
v: v3
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Jan 10, 2006
1 parent 56ac1d9 commit 1aca359
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a807f618b62594467a52b488912bd77606af0572
refs/heads/master: 313e58ab362473fb471f32b7bf86587f7c627a11
53 changes: 20 additions & 33 deletions trunk/drivers/video/fbsysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ static int mode_string(char *buf, unsigned int offset,
static ssize_t store_mode(struct class_device *class_device, const char * buf,
size_t count)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
char mstr[100];
struct fb_var_screeninfo var;
struct fb_modelist *modelist;
Expand Down Expand Up @@ -137,8 +136,7 @@ static ssize_t store_mode(struct class_device *class_device, const char * buf,

static ssize_t show_mode(struct class_device *class_device, char *buf)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);

if (!fb_info->mode)
return 0;
Expand All @@ -149,8 +147,7 @@ static ssize_t show_mode(struct class_device *class_device, char *buf)
static ssize_t store_modes(struct class_device *class_device, const char * buf,
size_t count)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
LIST_HEAD(old_list);
int i = count / sizeof(struct fb_videomode);

Expand All @@ -174,8 +171,7 @@ static ssize_t store_modes(struct class_device *class_device, const char * buf,

static ssize_t show_modes(struct class_device *class_device, char *buf)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
unsigned int i;
struct list_head *pos;
struct fb_modelist *modelist;
Expand All @@ -193,8 +189,7 @@ static ssize_t show_modes(struct class_device *class_device, char *buf)
static ssize_t store_bpp(struct class_device *class_device, const char * buf,
size_t count)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
struct fb_var_screeninfo var;
char ** last = NULL;
int err;
Expand All @@ -208,8 +203,7 @@ static ssize_t store_bpp(struct class_device *class_device, const char * buf,

static ssize_t show_bpp(struct class_device *class_device, char *buf)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->var.bits_per_pixel);
}

Expand Down Expand Up @@ -280,8 +274,7 @@ static ssize_t show_con_rotate(struct class_device *class_device, char *buf)
static ssize_t store_virtual(struct class_device *class_device,
const char * buf, size_t count)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
struct fb_var_screeninfo var;
char *last = NULL;
int err;
Expand All @@ -300,16 +293,14 @@ static ssize_t store_virtual(struct class_device *class_device,

static ssize_t show_virtual(struct class_device *class_device, char *buf)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
return snprintf(buf, PAGE_SIZE, "%d,%d\n", fb_info->var.xres_virtual,
fb_info->var.yres_virtual);
}

static ssize_t show_stride(struct class_device *class_device, char *buf)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->fix.line_length);
}

Expand All @@ -320,7 +311,7 @@ static ssize_t show_stride(struct class_device *class_device, char *buf)
static ssize_t store_cmap(struct class_device *class_device, const char *buf,
size_t count)
{
struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
int rc, i, start, length, transp = 0;

if ((count > PAGE_SIZE) || ((count % 16) != 0))
Expand Down Expand Up @@ -380,8 +371,7 @@ static ssize_t store_cmap(struct class_device *class_device, const char *buf,

static ssize_t show_cmap(struct class_device *class_device, char *buf)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
unsigned int i;

if (!fb_info->cmap.red || !fb_info->cmap.blue ||
Expand All @@ -405,8 +395,7 @@ static ssize_t show_cmap(struct class_device *class_device, char *buf)
static ssize_t store_blank(struct class_device *class_device, const char * buf,
size_t count)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
char *last = NULL;
int err;

Expand All @@ -422,41 +411,40 @@ static ssize_t store_blank(struct class_device *class_device, const char * buf,

static ssize_t show_blank(struct class_device *class_device, char *buf)
{
// struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
// struct fb_info *fb_info = class_get_devdata(class_device);
return 0;
}

static ssize_t store_console(struct class_device *class_device,
const char * buf, size_t count)
{
// struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
// struct fb_info *fb_info = class_get_devdata(class_device);
return 0;
}

static ssize_t show_console(struct class_device *class_device, char *buf)
{
// struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
// struct fb_info *fb_info = class_get_devdata(class_device);
return 0;
}

static ssize_t store_cursor(struct class_device *class_device,
const char * buf, size_t count)
{
// struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
// struct fb_info *fb_info = class_get_devdata(class_device);
return 0;
}

static ssize_t show_cursor(struct class_device *class_device, char *buf)
{
// struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
// struct fb_info *fb_info = class_get_devdata(class_device);
return 0;
}

static ssize_t store_pan(struct class_device *class_device, const char * buf,
size_t count)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
struct fb_var_screeninfo var;
char *last = NULL;
int err;
Expand All @@ -479,15 +467,14 @@ static ssize_t store_pan(struct class_device *class_device, const char * buf,

static ssize_t show_pan(struct class_device *class_device, char *buf)
{
struct fb_info *fb_info =
(struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);
return snprintf(buf, PAGE_SIZE, "%d,%d\n", fb_info->var.xoffset,
fb_info->var.xoffset);
}

static ssize_t show_name(struct class_device *class_device, char *buf)
{
struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
struct fb_info *fb_info = class_get_devdata(class_device);

return snprintf(buf, PAGE_SIZE, "%s\n", fb_info->fix.id);
}
Expand Down

0 comments on commit 1aca359

Please sign in to comment.