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
Kirill Smelkov
linux
Commits
3daf94b3
Commit
3daf94b3
authored
Jul 09, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I2C: sparse cleanups for a few i2c drivers.
parent
849d9e0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
19 deletions
+16
-19
drivers/i2c/busses/i2c-elektor.c
drivers/i2c/busses/i2c-elektor.c
+3
-3
drivers/i2c/chips/adm1031.c
drivers/i2c/chips/adm1031.c
+13
-16
No files found.
drivers/i2c/busses/i2c-elektor.c
View file @
3daf94b3
...
...
@@ -143,7 +143,7 @@ static int pcf_isa_init(void)
}
}
if
(
irq
>
0
)
{
if
(
request_irq
(
irq
,
pcf_isa_handler
,
0
,
"PCF8584"
,
0
)
<
0
)
{
if
(
request_irq
(
irq
,
pcf_isa_handler
,
0
,
"PCF8584"
,
NULL
)
<
0
)
{
printk
(
KERN_ERR
"i2c-elektor: Request irq%d failed
\n
"
,
irq
);
irq
=
0
;
}
else
...
...
@@ -244,7 +244,7 @@ static int __init i2c_pcfisa_init(void)
fail:
if
(
irq
>
0
)
{
disable_irq
(
irq
);
free_irq
(
irq
,
0
);
free_irq
(
irq
,
NULL
);
}
if
(
!
mmapped
)
...
...
@@ -258,7 +258,7 @@ static void i2c_pcfisa_exit(void)
if
(
irq
>
0
)
{
disable_irq
(
irq
);
free_irq
(
irq
,
0
);
free_irq
(
irq
,
NULL
);
}
if
(
!
mmapped
)
...
...
drivers/i2c/chips/adm1031.c
View file @
3daf94b3
...
...
@@ -101,10 +101,6 @@ static int adm1031_attach_adapter(struct i2c_adapter *adapter);
static
int
adm1031_detect
(
struct
i2c_adapter
*
adapter
,
int
address
,
int
kind
);
static
void
adm1031_init_client
(
struct
i2c_client
*
client
);
static
int
adm1031_detach_client
(
struct
i2c_client
*
client
);
static
inline
u8
adm1031_read_value
(
struct
i2c_client
*
client
,
u8
reg
);
static
inline
int
adm1031_write_value
(
struct
i2c_client
*
client
,
u8
reg
,
unsigned
int
value
);
static
struct
adm1031_data
*
adm1031_update_device
(
struct
device
*
dev
);
/* This is the driver that will be inserted */
...
...
@@ -116,7 +112,19 @@ static struct i2c_driver adm1031_driver = {
.
detach_client
=
adm1031_detach_client
,
};
static
int
adm1031_id
=
0
;
static
int
adm1031_id
;
static
inline
u8
adm1031_read_value
(
struct
i2c_client
*
client
,
u8
reg
)
{
return
i2c_smbus_read_byte_data
(
client
,
reg
);
}
static
inline
int
adm1031_write_value
(
struct
i2c_client
*
client
,
u8
reg
,
unsigned
int
value
)
{
return
i2c_smbus_write_byte_data
(
client
,
reg
,
value
);
}
#define TEMP_TO_REG(val) (((val) < 0 ? ((val - 500) / 1000) : \
((val + 500) / 1000)))
...
...
@@ -849,17 +857,6 @@ static int adm1031_detach_client(struct i2c_client *client)
return
0
;
}
static
inline
u8
adm1031_read_value
(
struct
i2c_client
*
client
,
u8
reg
)
{
return
i2c_smbus_read_byte_data
(
client
,
reg
);
}
static
inline
int
adm1031_write_value
(
struct
i2c_client
*
client
,
u8
reg
,
unsigned
int
value
)
{
return
i2c_smbus_write_byte_data
(
client
,
reg
,
value
);
}
static
void
adm1031_init_client
(
struct
i2c_client
*
client
)
{
unsigned
int
read_val
;
...
...
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