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
e784788d
Commit
e784788d
authored
Mar 30, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get rid of a bunch of open-coded create_proc_read_entry()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
96e7d915
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
22 deletions
+11
-22
arch/arm/kernel/swp_emulate.c
arch/arm/kernel/swp_emulate.c
+2
-3
arch/cris/arch-v10/kernel/fasttimer.c
arch/cris/arch-v10/kernel/fasttimer.c
+1
-3
arch/cris/arch-v32/kernel/fasttimer.c
arch/cris/arch-v32/kernel/fasttimer.c
+1
-4
arch/h8300/kernel/gpio.c
arch/h8300/kernel/gpio.c
+2
-3
drivers/char/ds1620.c
drivers/char/ds1620.c
+3
-4
drivers/staging/comedi/proc.c
drivers/staging/comedi/proc.c
+2
-5
No files found.
arch/arm/kernel/swp_emulate.c
View file @
e784788d
...
@@ -268,12 +268,11 @@ static int __init swp_emulation_init(void)
...
@@ -268,12 +268,11 @@ static int __init swp_emulation_init(void)
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
struct
proc_dir_entry
*
res
;
struct
proc_dir_entry
*
res
;
res
=
create_proc_entry
(
"cpu/swp_emulation"
,
S_IRUGO
,
NULL
);
res
=
create_proc_read_entry
(
"cpu/swp_emulation"
,
S_IRUGO
,
NULL
,
proc_read_status
,
NULL
);
if
(
!
res
)
if
(
!
res
)
return
-
ENOMEM
;
return
-
ENOMEM
;
res
->
read_proc
=
proc_read_status
;
#endif
/* CONFIG_PROC_FS */
#endif
/* CONFIG_PROC_FS */
printk
(
KERN_NOTICE
"Registering SWP/SWPB emulation handler
\n
"
);
printk
(
KERN_NOTICE
"Registering SWP/SWPB emulation handler
\n
"
);
...
...
arch/cris/arch-v10/kernel/fasttimer.c
View file @
e784788d
...
@@ -491,7 +491,6 @@ void schedule_usleep(unsigned long us)
...
@@ -491,7 +491,6 @@ void schedule_usleep(unsigned long us)
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
static
int
proc_fasttimer_read
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
len
static
int
proc_fasttimer_read
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
len
,
int
*
eof
,
void
*
data_unused
);
,
int
*
eof
,
void
*
data_unused
);
static
struct
proc_dir_entry
*
fasttimer_proc_entry
;
#endif
/* CONFIG_PROC_FS */
#endif
/* CONFIG_PROC_FS */
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
...
@@ -857,8 +856,7 @@ int fast_timer_init(void)
...
@@ -857,8 +856,7 @@ int fast_timer_init(void)
}
}
#endif
#endif
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
if
((
fasttimer_proc_entry
=
create_proc_entry
(
"fasttimer"
,
0
,
0
)))
create_proc_read_entry
(
"fasttimer"
,
0
,
NULL
,
proc_fasttimer_read
,
NULL
);
fasttimer_proc_entry
->
read_proc
=
proc_fasttimer_read
;
#endif
/* PROC_FS */
#endif
/* PROC_FS */
if
(
request_irq
(
TIMER1_IRQ_NBR
,
timer1_handler
,
0
,
if
(
request_irq
(
TIMER1_IRQ_NBR
,
timer1_handler
,
0
,
"fast timer int"
,
NULL
))
"fast timer int"
,
NULL
))
...
...
arch/cris/arch-v32/kernel/fasttimer.c
View file @
e784788d
...
@@ -465,7 +465,6 @@ void schedule_usleep(unsigned long us)
...
@@ -465,7 +465,6 @@ void schedule_usleep(unsigned long us)
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
static
int
proc_fasttimer_read
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
len
static
int
proc_fasttimer_read
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
len
,
int
*
eof
,
void
*
data_unused
);
,
int
*
eof
,
void
*
data_unused
);
static
struct
proc_dir_entry
*
fasttimer_proc_entry
;
#endif
/* CONFIG_PROC_FS */
#endif
/* CONFIG_PROC_FS */
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
...
@@ -816,9 +815,7 @@ int fast_timer_init(void)
...
@@ -816,9 +815,7 @@ int fast_timer_init(void)
printk
(
"fast_timer_init()
\n
"
);
printk
(
"fast_timer_init()
\n
"
);
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
fasttimer_proc_entry
=
create_proc_entry
(
"fasttimer"
,
0
,
0
);
create_proc_read_entry
(
"fasttimer"
,
0
,
NULL
,
proc_fasttimer_read
,
NULL
);
if
(
fasttimer_proc_entry
)
fasttimer_proc_entry
->
read_proc
=
proc_fasttimer_read
;
#endif
/* PROC_FS */
#endif
/* PROC_FS */
if
(
request_irq
(
TIMER0_INTR_VECT
,
timer_trig_interrupt
,
if
(
request_irq
(
TIMER0_INTR_VECT
,
timer_trig_interrupt
,
IRQF_SHARED
|
IRQF_DISABLED
,
IRQF_SHARED
|
IRQF_DISABLED
,
...
...
arch/h8300/kernel/gpio.c
View file @
e784788d
...
@@ -158,9 +158,8 @@ static __init int register_proc(void)
...
@@ -158,9 +158,8 @@ static __init int register_proc(void)
{
{
struct
proc_dir_entry
*
proc_gpio
;
struct
proc_dir_entry
*
proc_gpio
;
proc_gpio
=
create_proc_entry
(
"gpio"
,
S_IRUGO
,
NULL
);
proc_gpio
=
create_proc_read_entry
(
"gpio"
,
S_IRUGO
,
NULL
,
if
(
proc_gpio
)
gpio_proc_read
,
NULL
);
proc_gpio
->
read_proc
=
gpio_proc_read
;
return
proc_gpio
!=
NULL
;
return
proc_gpio
!=
NULL
;
}
}
...
...
drivers/char/ds1620.c
View file @
e784788d
...
@@ -397,10 +397,9 @@ static int __init ds1620_init(void)
...
@@ -397,10 +397,9 @@ static int __init ds1620_init(void)
return
ret
;
return
ret
;
#ifdef THERM_USE_PROC
#ifdef THERM_USE_PROC
proc_therm_ds1620
=
create_proc_entry
(
"therm"
,
0
,
NULL
);
proc_therm_ds1620
=
create_proc_read_entry
(
"therm"
,
0
,
NULL
,
if
(
proc_therm_ds1620
)
proc_therm_ds1620_read
,
NULL
);
proc_therm_ds1620
->
read_proc
=
proc_therm_ds1620_read
;
if
(
!
proc_therm_ds1620
)
else
printk
(
KERN_ERR
"therm: unable to register /proc/therm
\n
"
);
printk
(
KERN_ERR
"therm: unable to register /proc/therm
\n
"
);
#endif
#endif
...
...
drivers/staging/comedi/proc.c
View file @
e784788d
...
@@ -80,11 +80,8 @@ static int comedi_read(char *buf, char **start, off_t offset, int len,
...
@@ -80,11 +80,8 @@ static int comedi_read(char *buf, char **start, off_t offset, int len,
void
comedi_proc_init
(
void
)
void
comedi_proc_init
(
void
)
{
{
struct
proc_dir_entry
*
comedi_proc
;
create_proc_read_entry
(
"comedi"
,
S_IFREG
|
S_IRUGO
,
NULL
,
comedi_read
,
NULL
);
comedi_proc
=
create_proc_entry
(
"comedi"
,
S_IFREG
|
S_IRUGO
,
NULL
);
if
(
comedi_proc
)
comedi_proc
->
read_proc
=
comedi_read
;
}
}
void
comedi_proc_cleanup
(
void
)
void
comedi_proc_cleanup
(
void
)
...
...
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