From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] I2C update for 2.6.8-rc1
Date: Wed, 14 Jul 2004 17:07:12 -0700 [thread overview]
Message-ID: <10898500313698@kroah.com> (raw)
In-Reply-To: <10898500311477@kroah.com>
ChangeSet 1.1784.13.10, 2004/07/09 15:07:03-07:00, greg@kroah.com
I2C: sparse cleanups for a few i2c drivers.
drivers/i2c/busses/i2c-elektor.c | 6 +++---
drivers/i2c/chips/adm1031.c | 29 +++++++++++++----------------
2 files changed, 16 insertions(+), 19 deletions(-)
diff -Nru a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c
--- a/drivers/i2c/busses/i2c-elektor.c 2004-07-14 16:59:33 -07:00
+++ b/drivers/i2c/busses/i2c-elektor.c 2004-07-14 16:59:33 -07:00
@@ -143,7 +143,7 @@
}
}
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 @@
fail:
if (irq > 0) {
disable_irq(irq);
- free_irq(irq, 0);
+ free_irq(irq, NULL);
}
if (!mmapped)
@@ -258,7 +258,7 @@
if (irq > 0) {
disable_irq(irq);
- free_irq(irq, 0);
+ free_irq(irq, NULL);
}
if (!mmapped)
diff -Nru a/drivers/i2c/chips/adm1031.c b/drivers/i2c/chips/adm1031.c
--- a/drivers/i2c/chips/adm1031.c 2004-07-14 16:59:33 -07:00
+++ b/drivers/i2c/chips/adm1031.c 2004-07-14 16:59:33 -07:00
@@ -101,10 +101,6 @@
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 @@
.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)))
@@ -847,17 +855,6 @@
}
kfree(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)
next prev parent reply other threads:[~2004-07-15 0:32 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-15 0:05 [BK PATCH] I2C update for 2.6.8-rc1 Greg KH
2004-07-15 0:07 ` [PATCH] " Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH [this message]
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-15 0:07 ` Greg KH
2004-07-16 17:07 ` Pavel Machek
2004-07-16 17:17 ` Greg KH
2004-07-16 17:39 ` Bob Riegelmann
2004-07-16 18:19 ` Adam Kropelin
2004-07-17 14:30 ` Greg (or anyone else) one small i2c question Reinder
2004-07-30 5:40 ` --- " Reinder
2004-07-30 6:30 ` Denis Vlasenko
2004-08-25 6:44 ` Greg " Greg KH
2004-08-24 21:58 ` [BK PATCH] I2C update for 2.6.8-rc1 Alex Williamson
2004-08-24 22:04 ` Greg KH
2004-08-25 0:37 ` Linus Torvalds
2004-08-25 1:38 ` Alex Williamson
2004-08-25 1:42 ` Alex Williamson
2004-08-25 2:02 ` Linus Torvalds
2004-08-25 6:14 ` Greg KH
2004-08-25 6:36 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10898500313698@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@stimpy.netroedge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox