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
246d79bf
Commit
246d79bf
authored
Jul 26, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jul 26, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] drivers/macintosh annotations
Signed-off-by:
Linus Torvalds
<
torvalds@osdl.org
>
parent
b17382ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
drivers/macintosh/ans-lcd.c
drivers/macintosh/ans-lcd.c
+4
-4
drivers/macintosh/via-pmu.c
drivers/macintosh/via-pmu.c
+6
-5
No files found.
drivers/macintosh/ans-lcd.c
View file @
246d79bf
...
@@ -49,10 +49,10 @@ anslcd_write_byte_data ( unsigned char c )
...
@@ -49,10 +49,10 @@ anslcd_write_byte_data ( unsigned char c )
}
}
static
ssize_t
__pmac
static
ssize_t
__pmac
anslcd_write
(
struct
file
*
file
,
const
char
*
buf
,
anslcd_write
(
struct
file
*
file
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
{
{
const
char
*
p
=
buf
;
const
char
__user
*
p
=
buf
;
int
i
;
int
i
;
#ifdef DEBUG
#ifdef DEBUG
...
@@ -75,7 +75,7 @@ static int __pmac
...
@@ -75,7 +75,7 @@ static int __pmac
anslcd_ioctl
(
struct
inode
*
inode
,
struct
file
*
file
,
anslcd_ioctl
(
struct
inode
*
inode
,
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
)
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
char
ch
,
*
temp
;
char
ch
,
__user
*
temp
;
#ifdef DEBUG
#ifdef DEBUG
printk
(
KERN_DEBUG
"LCD: ioctl(%d,%d)
\n
"
,
cmd
,
arg
);
printk
(
KERN_DEBUG
"LCD: ioctl(%d,%d)
\n
"
,
cmd
,
arg
);
...
@@ -91,7 +91,7 @@ anslcd_ioctl( struct inode * inode, struct file * file,
...
@@ -91,7 +91,7 @@ anslcd_ioctl( struct inode * inode, struct file * file,
anslcd_write_byte_ctrl
(
0x02
);
anslcd_write_byte_ctrl
(
0x02
);
return
0
;
return
0
;
case
ANSLCD_SENDCTRL
:
case
ANSLCD_SENDCTRL
:
temp
=
(
char
*
)
arg
;
temp
=
(
char
__user
*
)
arg
;
__get_user
(
ch
,
temp
);
__get_user
(
ch
,
temp
);
for
(;
ch
;
temp
++
)
{
/* FIXME: This is ugly, but should work, as a \0 byte is not a valid command code */
for
(;
ch
;
temp
++
)
{
/* FIXME: This is ugly, but should work, as a \0 byte is not a valid command code */
anslcd_write_byte_ctrl
(
ch
);
anslcd_write_byte_ctrl
(
ch
);
...
...
drivers/macintosh/via-pmu.c
View file @
246d79bf
...
@@ -2880,6 +2880,7 @@ pmu_ioctl(struct inode * inode, struct file *filp,
...
@@ -2880,6 +2880,7 @@ pmu_ioctl(struct inode * inode, struct file *filp,
u_int
cmd
,
u_long
arg
)
u_int
cmd
,
u_long
arg
)
{
{
struct
pmu_private
*
pp
=
filp
->
private_data
;
struct
pmu_private
*
pp
=
filp
->
private_data
;
__u32
__user
*
argp
=
(
__u32
__user
*
)
arg
;
int
error
;
int
error
;
switch
(
cmd
)
{
switch
(
cmd
)
{
...
@@ -2906,7 +2907,7 @@ pmu_ioctl(struct inode * inode, struct file *filp,
...
@@ -2906,7 +2907,7 @@ pmu_ioctl(struct inode * inode, struct file *filp,
sleep_in_progress
=
0
;
sleep_in_progress
=
0
;
return
error
;
return
error
;
case
PMU_IOC_CAN_SLEEP
:
case
PMU_IOC_CAN_SLEEP
:
return
put_user
((
u32
)
can_sleep
,
(
__u32
*
)
arg
);
return
put_user
((
u32
)
can_sleep
,
argp
);
#ifdef CONFIG_PMAC_BACKLIGHT
#ifdef CONFIG_PMAC_BACKLIGHT
/* Backlight should have its own device or go via
/* Backlight should have its own device or go via
...
@@ -2918,13 +2919,13 @@ pmu_ioctl(struct inode * inode, struct file *filp,
...
@@ -2918,13 +2919,13 @@ pmu_ioctl(struct inode * inode, struct file *filp,
error
=
get_backlight_level
();
error
=
get_backlight_level
();
if
(
error
<
0
)
if
(
error
<
0
)
return
error
;
return
error
;
return
put_user
(
error
,
(
__u32
*
)
arg
);
return
put_user
(
error
,
argp
);
case
PMU_IOC_SET_BACKLIGHT
:
case
PMU_IOC_SET_BACKLIGHT
:
{
{
__u32
value
;
__u32
value
;
if
(
sleep_in_progress
)
if
(
sleep_in_progress
)
return
-
EBUSY
;
return
-
EBUSY
;
error
=
get_user
(
value
,
(
__u32
*
)
arg
);
error
=
get_user
(
value
,
argp
);
if
(
!
error
)
if
(
!
error
)
error
=
set_backlight_level
(
value
);
error
=
set_backlight_level
(
value
);
return
error
;
return
error
;
...
@@ -2943,9 +2944,9 @@ pmu_ioctl(struct inode * inode, struct file *filp,
...
@@ -2943,9 +2944,9 @@ pmu_ioctl(struct inode * inode, struct file *filp,
#endif
/* CONFIG_INPUT_ADBHID */
#endif
/* CONFIG_INPUT_ADBHID */
#endif
/* CONFIG_PMAC_BACKLIGHT */
#endif
/* CONFIG_PMAC_BACKLIGHT */
case
PMU_IOC_GET_MODEL
:
case
PMU_IOC_GET_MODEL
:
return
put_user
(
pmu_kind
,
(
__u32
*
)
arg
);
return
put_user
(
pmu_kind
,
argp
);
case
PMU_IOC_HAS_ADB
:
case
PMU_IOC_HAS_ADB
:
return
put_user
(
pmu_has_adb
,
(
__u32
*
)
arg
);
return
put_user
(
pmu_has_adb
,
argp
);
}
}
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
...
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