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
1539af85
Commit
1539af85
authored
Jan 20, 2003
by
Andy Grover
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPI: Make proc write interfaces work (Pavel Machek)
parent
5e50cc1b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
32 deletions
+34
-32
drivers/acpi/processor.c
drivers/acpi/processor.c
+9
-9
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+13
-11
drivers/acpi/toshiba_acpi.c
drivers/acpi/toshiba_acpi.c
+12
-12
No files found.
drivers/acpi/processor.c
View file @
1539af85
...
...
@@ -794,7 +794,7 @@ acpi_processor_register_performance (
}
EXPORT_SYMBOL
(
acpi_processor_register_performance
);
/* for the rest of it, check
processor_perf
.c */
/* for the rest of it, check
cpufreq/acpi
.c */
/* --------------------------------------------------------------------------
...
...
@@ -1350,8 +1350,8 @@ static int
acpi_processor_write_throttling
(
struct
file
*
file
,
const
char
*
buffer
,
unsigned
long
count
,
void
*
data
)
size_t
count
,
loff_t
*
data
)
{
int
result
=
0
;
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
data
;
...
...
@@ -1412,8 +1412,8 @@ static int
acpi_processor_write_limit
(
struct
file
*
file
,
const
char
*
buffer
,
unsigned
long
count
,
void
*
data
)
size_t
count
,
loff_t
*
data
)
{
int
result
=
0
;
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
data
;
...
...
@@ -1511,7 +1511,7 @@ acpi_processor_add_fs (
ACPI_PROCESSOR_FILE_THROTTLING
));
else
{
entry
->
proc_fops
=
&
acpi_processor_throttling_fops
;
entry
->
write_proc
=
acpi_processor_write_throttling
;
entry
->
proc_fops
->
write
=
acpi_processor_write_throttling
;
entry
->
data
=
acpi_driver_data
(
device
);
}
...
...
@@ -1524,7 +1524,7 @@ acpi_processor_add_fs (
ACPI_PROCESSOR_FILE_LIMIT
));
else
{
entry
->
proc_fops
=
&
acpi_processor_limit_fops
;
entry
->
write_proc
=
acpi_processor_write_limit
;
entry
->
proc_fops
->
write
=
acpi_processor_write_limit
;
entry
->
data
=
acpi_driver_data
(
device
);
}
...
...
drivers/acpi/thermal.c
View file @
1539af85
...
...
@@ -877,10 +877,12 @@ static int
acpi_thermal_write_trip_points
(
struct
file
*
file
,
const
char
*
buffer
,
unsigned
long
count
,
void
*
data
)
size_t
count
,
loff_t
*
ppos
)
{
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
data
;
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
m
->
private
;
char
limit_string
[
25
]
=
{
'\0'
};
int
critical
,
hot
,
passive
,
active0
,
active1
;
...
...
@@ -944,8 +946,8 @@ static int
acpi_thermal_write_cooling_mode
(
struct
file
*
file
,
const
char
*
buffer
,
unsigned
long
count
,
void
*
data
)
size_t
count
,
loff_t
*
data
)
{
int
result
=
0
;
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
data
;
...
...
@@ -1004,8 +1006,8 @@ static int
acpi_thermal_write_polling
(
struct
file
*
file
,
const
char
*
buffer
,
unsigned
long
count
,
void
*
data
)
size_t
count
,
loff_t
*
data
)
{
int
result
=
0
;
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
data
;
...
...
@@ -1079,10 +1081,10 @@ acpi_thermal_add_fs (
if
(
!
entry
)
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Unable to create '%s' fs entry
\n
"
,
ACPI_THERMAL_FILE_
POLLING_FREQ
));
ACPI_THERMAL_FILE_
TRIP_POINTS
));
else
{
entry
->
proc_fops
=
&
acpi_thermal_trip_fops
;
entry
->
write_proc
=
acpi_thermal_write_trip_points
;
entry
->
proc_fops
->
write
=
acpi_thermal_write_trip_points
;
entry
->
data
=
acpi_driver_data
(
device
);
}
...
...
@@ -1095,7 +1097,7 @@ acpi_thermal_add_fs (
ACPI_THERMAL_FILE_COOLING_MODE
));
else
{
entry
->
proc_fops
=
&
acpi_thermal_cooling_fops
;
entry
->
write_proc
=
acpi_thermal_write_cooling_mode
;
entry
->
proc_fops
->
write
=
acpi_thermal_write_cooling_mode
;
entry
->
data
=
acpi_driver_data
(
device
);
}
...
...
@@ -1108,7 +1110,7 @@ acpi_thermal_add_fs (
ACPI_THERMAL_FILE_POLLING_FREQ
));
else
{
entry
->
proc_fops
=
&
acpi_thermal_polling_fops
;
entry
->
write_proc
=
acpi_thermal_write_polling
;
entry
->
proc_fops
->
write
=
acpi_thermal_write_polling
;
entry
->
data
=
acpi_driver_data
(
device
);
}
...
...
drivers/acpi/toshiba_acpi.c
View file @
1539af85
...
...
@@ -309,8 +309,8 @@ static int toshiba_lcd_open_fs(struct inode *inode, struct file *file)
}
static
int
proc_write_lcd
(
struct
file
*
file
,
const
char
*
buffer
,
unsigned
long
count
,
void
*
data
)
proc_write_lcd
(
struct
file
*
file
,
const
char
*
buffer
,
size_t
count
,
loff_t
*
data
)
{
int
value
;
/*int byte_count;*/
...
...
@@ -358,8 +358,8 @@ static int toshiba_video_open_fs(struct inode *inode, struct file *file)
}
static
int
proc_write_video
(
struct
file
*
file
,
const
char
*
buffer
,
unsigned
long
count
,
void
*
data
)
proc_write_video
(
struct
file
*
file
,
const
char
*
buffer
,
size_t
count
,
loff_t
*
data
)
{
int
value
;
const
char
*
buffer_end
=
buffer
+
count
;
...
...
@@ -423,8 +423,8 @@ static int toshiba_fan_open_fs(struct inode *inode, struct file *file)
}
static
int
proc_write_fan
(
struct
file
*
file
,
const
char
*
buffer
,
unsigned
long
count
,
void
*
data
)
proc_write_fan
(
struct
file
*
file
,
const
char
*
buffer
,
size_t
count
,
loff_t
*
data
)
{
int
value
;
u32
hci_result
;
...
...
@@ -476,8 +476,8 @@ static int toshiba_keys_open_fs(struct inode *inode, struct file *file)
}
static
int
proc_write_keys
(
struct
file
*
file
,
const
char
*
buffer
,
unsigned
long
count
,
void
*
data
)
proc_write_keys
(
struct
file
*
file
,
const
char
*
buffer
,
size_t
count
,
loff_t
*
data
)
{
int
value
;
...
...
@@ -518,28 +518,28 @@ add_device(void)
toshiba_proc_dir
);
if
(
proc
)
{
proc
->
proc_fops
=
&
toshiba_lcd_fops
;
proc
->
write_proc
=
proc_write_lcd
;
proc
->
proc_fops
->
write
=
proc_write_lcd
;
}
proc
=
create_proc_entry
(
PROC_VIDEO
,
S_IFREG
|
S_IRUGO
|
S_IWUSR
,
toshiba_proc_dir
);
if
(
proc
)
{
proc
->
proc_fops
=
&
toshiba_video_fops
;
proc
->
write_proc
=
proc_write_video
;
proc
->
proc_fops
->
write
=
proc_write_video
;
}
proc
=
create_proc_entry
(
PROC_FAN
,
S_IFREG
|
S_IRUGO
|
S_IWUSR
,
toshiba_proc_dir
);
if
(
proc
)
{
proc
->
proc_fops
=
&
toshiba_fan_fops
;
proc
->
write_proc
=
proc_write_fan
;
proc
->
proc_fops
->
write
=
proc_write_fan
;
}
proc
=
create_proc_entry
(
PROC_KEYS
,
S_IFREG
|
S_IRUGO
|
S_IWUSR
,
toshiba_proc_dir
);
if
(
proc
)
{
proc
->
proc_fops
=
&
toshiba_keys_fops
;
proc
->
write_proc
=
proc_write_keys
;
proc
->
proc_fops
->
write
=
proc_write_keys
;
}
proc
=
create_proc_entry
(
PROC_VERSION
,
S_IFREG
|
S_IRUGO
|
S_IWUSR
,
...
...
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