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
c25c7712
Commit
c25c7712
authored
Aug 08, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: add user annotations to rtc driver
parent
dc5c7245
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
arch/ppc64/kernel/rtc.c
arch/ppc64/kernel/rtc.c
+5
-5
No files found.
arch/ppc64/kernel/rtc.c
View file @
c25c7712
...
@@ -56,7 +56,7 @@ extern int piranha_simulator;
...
@@ -56,7 +56,7 @@ extern int piranha_simulator;
* ioctls.
* ioctls.
*/
*/
static
ssize_t
rtc_read
(
struct
file
*
file
,
char
*
buf
,
static
ssize_t
rtc_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
);
size_t
count
,
loff_t
*
ppos
);
static
int
rtc_ioctl
(
struct
inode
*
inode
,
struct
file
*
file
,
static
int
rtc_ioctl
(
struct
inode
*
inode
,
struct
file
*
file
,
...
@@ -79,7 +79,7 @@ static const unsigned char days_in_mo[] =
...
@@ -79,7 +79,7 @@ static const unsigned char days_in_mo[] =
* Now all the various file operations that we export.
* Now all the various file operations that we export.
*/
*/
static
ssize_t
rtc_read
(
struct
file
*
file
,
char
*
buf
,
static
ssize_t
rtc_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
{
{
return
-
EIO
;
return
-
EIO
;
...
@@ -106,7 +106,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
...
@@ -106,7 +106,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
if
(
!
capable
(
CAP_SYS_TIME
))
if
(
!
capable
(
CAP_SYS_TIME
))
return
-
EACCES
;
return
-
EACCES
;
if
(
copy_from_user
(
&
rtc_tm
,
(
struct
rtc_time
*
)
arg
,
if
(
copy_from_user
(
&
rtc_tm
,
(
struct
rtc_time
__user
*
)
arg
,
sizeof
(
struct
rtc_time
)))
sizeof
(
struct
rtc_time
)))
return
-
EFAULT
;
return
-
EFAULT
;
...
@@ -140,7 +140,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
...
@@ -140,7 +140,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
}
case
RTC_EPOCH_READ
:
/* Read the epoch. */
case
RTC_EPOCH_READ
:
/* Read the epoch. */
{
{
return
put_user
(
epoch
,
(
unsigned
long
*
)
arg
);
return
put_user
(
epoch
,
(
unsigned
long
__user
*
)
arg
);
}
}
case
RTC_EPOCH_SET
:
/* Set the epoch. */
case
RTC_EPOCH_SET
:
/* Set the epoch. */
{
{
...
@@ -159,7 +159,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
...
@@ -159,7 +159,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
default:
default:
return
-
EINVAL
;
return
-
EINVAL
;
}
}
return
copy_to_user
((
void
*
)
arg
,
&
wtime
,
sizeof
wtime
)
?
-
EFAULT
:
0
;
return
copy_to_user
((
void
__user
*
)
arg
,
&
wtime
,
sizeof
wtime
)
?
-
EFAULT
:
0
;
}
}
static
int
rtc_open
(
struct
inode
*
inode
,
struct
file
*
file
)
static
int
rtc_open
(
struct
inode
*
inode
,
struct
file
*
file
)
...
...
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