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
8967454e
Commit
8967454e
authored
May 28, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Fix probe error handling in bbc_{envctrl,i2c}.c driver.
parent
a6cec28d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
drivers/sbus/char/bbc_envctrl.c
drivers/sbus/char/bbc_envctrl.c
+4
-2
drivers/sbus/char/bbc_i2c.c
drivers/sbus/char/bbc_i2c.c
+8
-5
No files found.
drivers/sbus/char/bbc_envctrl.c
View file @
8967454e
...
...
@@ -571,12 +571,13 @@ static void attach_one_fan(struct linux_ebus_child *echild, int fan_idx)
set_fan_speeds
(
fp
);
}
void
bbc_envctrl_init
(
void
)
int
bbc_envctrl_init
(
void
)
{
struct
linux_ebus_child
*
echild
;
int
temp_index
=
0
;
int
fan_index
=
0
;
int
devidx
=
0
;
int
err
=
0
;
while
((
echild
=
bbc_i2c_getdev
(
devidx
++
))
!=
NULL
)
{
if
(
!
strcmp
(
echild
->
prom_name
,
"temperature"
))
...
...
@@ -585,7 +586,8 @@ void bbc_envctrl_init(void)
attach_one_fan
(
echild
,
fan_index
++
);
}
if
(
temp_index
!=
0
&&
fan_index
!=
0
)
kernel_thread
(
kenvctrld
,
NULL
,
CLONE_FS
|
CLONE_FILES
);
err
=
kernel_thread
(
kenvctrld
,
NULL
,
CLONE_FS
|
CLONE_FILES
);
return
err
;
}
static
void
destroy_one_temp
(
struct
bbc_cpu_temperature
*
tp
)
...
...
drivers/sbus/char/bbc_i2c.c
View file @
8967454e
...
...
@@ -430,14 +430,15 @@ static int __init bbc_present(void)
return
0
;
}
extern
void
bbc_envctrl_init
(
void
);
extern
int
bbc_envctrl_init
(
void
);
extern
void
bbc_envctrl_cleanup
(
void
);
static
void
bbc_i2c_cleanup
(
void
);
static
int
__init
bbc_i2c_init
(
void
)
{
struct
linux_ebus
*
ebus
=
NULL
;
struct
linux_ebus_device
*
edev
=
NULL
;
int
index
=
0
;
int
err
,
index
=
0
;
if
(
tlb_type
!=
cheetah
||
!
bbc_present
())
return
-
ENODEV
;
...
...
@@ -454,11 +455,13 @@ static int __init bbc_i2c_init(void)
if
(
!
index
)
return
-
ENODEV
;
bbc_envctrl_init
();
return
0
;
err
=
bbc_envctrl_init
();
if
(
err
)
bbc_i2c_cleanup
();
return
err
;
}
static
void
__exit
bbc_i2c_cleanup
(
void
)
static
void
bbc_i2c_cleanup
(
void
)
{
struct
bbc_i2c_bus
*
bp
=
all_bbc_i2c
;
...
...
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