Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
30420f8f
Commit
30420f8f
authored
Jan 09, 2006
by
Matthew Garrett
Committed by
Linus Torvalds
Jan 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Add sysfs entry to disable framebuffer access
What
parent
c35dba60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
drivers/video/fbsysfs.c
drivers/video/fbsysfs.c
+23
-0
No files found.
drivers/video/fbsysfs.c
View file @
30420f8f
...
@@ -492,6 +492,28 @@ static ssize_t show_name(struct class_device *class_device, char *buf)
...
@@ -492,6 +492,28 @@ static ssize_t show_name(struct class_device *class_device, char *buf)
return
snprintf
(
buf
,
PAGE_SIZE
,
"%s
\n
"
,
fb_info
->
fix
.
id
);
return
snprintf
(
buf
,
PAGE_SIZE
,
"%s
\n
"
,
fb_info
->
fix
.
id
);
}
}
static
ssize_t
store_fbstate
(
struct
class_device
*
class_device
,
const
char
*
buf
,
size_t
count
)
{
struct
fb_info
*
fb_info
=
class_get_devdata
(
class_device
);
u32
state
;
char
*
last
=
NULL
;
state
=
simple_strtoul
(
buf
,
&
last
,
0
);
acquire_console_sem
();
fb_set_suspend
(
fb_info
,
(
int
)
state
);
release_console_sem
();
return
count
;
}
static
ssize_t
show_fbstate
(
struct
class_device
*
class_device
,
char
*
buf
)
{
struct
fb_info
*
fb_info
=
class_get_devdata
(
class_device
);
return
snprintf
(
buf
,
PAGE_SIZE
,
"%d
\n
"
,
fb_info
->
state
);
}
static
struct
class_device_attribute
class_device_attrs
[]
=
{
static
struct
class_device_attribute
class_device_attrs
[]
=
{
__ATTR
(
bits_per_pixel
,
S_IRUGO
|
S_IWUSR
,
show_bpp
,
store_bpp
),
__ATTR
(
bits_per_pixel
,
S_IRUGO
|
S_IWUSR
,
show_bpp
,
store_bpp
),
__ATTR
(
blank
,
S_IRUGO
|
S_IWUSR
,
show_blank
,
store_blank
),
__ATTR
(
blank
,
S_IRUGO
|
S_IWUSR
,
show_blank
,
store_blank
),
...
@@ -507,6 +529,7 @@ static struct class_device_attribute class_device_attrs[] = {
...
@@ -507,6 +529,7 @@ static struct class_device_attribute class_device_attrs[] = {
__ATTR
(
rotate
,
S_IRUGO
|
S_IWUSR
,
show_rotate
,
store_rotate
),
__ATTR
(
rotate
,
S_IRUGO
|
S_IWUSR
,
show_rotate
,
store_rotate
),
__ATTR
(
con_rotate
,
S_IRUGO
|
S_IWUSR
,
show_con_rotate
,
store_con_rotate
),
__ATTR
(
con_rotate
,
S_IRUGO
|
S_IWUSR
,
show_con_rotate
,
store_con_rotate
),
__ATTR
(
con_rotate_all
,
S_IWUSR
,
NULL
,
store_con_rotate_all
),
__ATTR
(
con_rotate_all
,
S_IWUSR
,
NULL
,
store_con_rotate_all
),
__ATTR
(
state
,
S_IRUGO
|
S_IWUSR
,
show_fbstate
,
store_fbstate
),
};
};
int
fb_init_class_device
(
struct
fb_info
*
fb_info
)
int
fb_init_class_device
(
struct
fb_info
*
fb_info
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment