From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] More i2c driver changes for 2.5.66
Date: Wed, 2 Apr 2003 16:15:58 -0800 [thread overview]
Message-ID: <10493289582408@kroah.com> (raw)
In-Reply-To: <10493289583037@kroah.com>
ChangeSet 1.977.29.7, 2003/04/02 11:34:13-08:00, greg@kroah.com
i2c: remove sysctl and proc functions from via686a.c driver
This still needs to be converted to use sysfs files, but due to
lack of hardware, I can not do this. This change is necessary as
the sysctl and proc interface is about to go away.
drivers/i2c/chips/via686a.c | 56 +++++++++++++-------------------------------
1 files changed, 17 insertions(+), 39 deletions(-)
diff -Nru a/drivers/i2c/chips/via686a.c b/drivers/i2c/chips/via686a.c
--- a/drivers/i2c/chips/via686a.c Wed Apr 2 16:01:14 2003
+++ b/drivers/i2c/chips/via686a.c Wed Apr 2 16:01:14 2003
@@ -369,8 +369,6 @@
dynamically allocated, at the same time when a new via686a client is
allocated. */
struct via686a_data {
- int sysctl_id;
-
struct semaphore update_lock;
char valid; /* !=0 if following fields are valid */
unsigned long last_updated; /* In jiffies */
@@ -390,8 +388,7 @@
static struct pci_dev *s_bridge; /* pointer to the (only) via686a */
static int via686a_attach_adapter(struct i2c_adapter *adapter);
-static int via686a_detect(struct i2c_adapter *adapter, int address,
- unsigned short flags, int kind);
+static int via686a_detect(struct i2c_adapter *adapter, int address, int kind);
static int via686a_detach_client(struct i2c_client *client);
static int via686a_read_value(struct i2c_client *client, u8 register);
@@ -400,18 +397,6 @@
static void via686a_update_client(struct i2c_client *client);
static void via686a_init_client(struct i2c_client *client);
-
-static void via686a_in(struct i2c_client *client, int operation,
- int ctl_name, int *nrels_mag, long *results);
-static void via686a_fan(struct i2c_client *client, int operation,
- int ctl_name, int *nrels_mag, long *results);
-static void via686a_temp(struct i2c_client *client, int operation,
- int ctl_name, int *nrels_mag, long *results);
-static void via686a_alarms(struct i2c_client *client, int operation,
- int ctl_name, int *nrels_mag, long *results);
-static void via686a_fan_div(struct i2c_client *client, int operation,
- int ctl_name, int *nrels_mag, long *results);
-
static int via686a_id = 0;
/* The driver. I choose to use type i2c_driver, as at is identical to both
@@ -457,6 +442,7 @@
/* -- SENSORS SYSCTL END -- */
+#if 0
/* These files are created for each detected VIA686A. This is just a template;
though at first sight, you might think we could use a statically
allocated list, we need some way to get back to the parent - which
@@ -489,6 +475,7 @@
&i2c_proc_real, &i2c_sysctl_real, NULL, &via686a_alarms},
{0}
};
+#endif
static inline int via686a_read_value(struct i2c_client *client, u8 reg)
{
@@ -507,15 +494,12 @@
return i2c_detect(adapter, &addr_data, via686a_detect);
}
-int via686a_detect(struct i2c_adapter *adapter, int address,
- unsigned short flags, int kind)
+static int via686a_detect(struct i2c_adapter *adapter, int address, int kind)
{
- int i;
struct i2c_client *new_client;
struct via686a_data *data;
int err = 0;
- const char *type_name = "via686a";
- const char client_name[] = "via686a chip";
+ const char *name = "via686a";
u16 val;
/* Make sure we are probing the ISA bus!! */
@@ -570,7 +554,7 @@
new_client->flags = 0;
/* Fill in the remaining client fields and put into the global list */
- snprintf(new_client->dev.name, DEVICE_NAME_SIZE, client_name);
+ snprintf(new_client->dev.name, DEVICE_NAME_SIZE, name);
new_client->id = via686a_id++;
data->valid = 0;
@@ -579,21 +563,10 @@
if ((err = i2c_attach_client(new_client)))
goto ERROR3;
- /* Register a new directory entry with module sensors */
- if ((i = i2c_register_entry((struct i2c_client *) new_client,
- type_name,
- via686a_dir_table_template)) < 0) {
- err = i;
- goto ERROR4;
- }
- data->sysctl_id = i;
-
/* Initialize the VIA686A chip */
via686a_init_client(new_client);
return 0;
- ERROR4:
- i2c_detach_client(new_client);
ERROR3:
release_region(address, VIA686A_EXTENT);
kfree(new_client);
@@ -604,8 +577,6 @@
static int via686a_detach_client(struct i2c_client *client)
{
int err;
- struct via686a_data *data = i2c_get_clientdata(client);
- i2c_deregister_entry(data->sysctl_id);
if ((err = i2c_detach_client(client))) {
dev_err(&client->dev,
@@ -752,6 +723,9 @@
large enough (by checking the incoming value of *nrels). This is not very
good practice, but as long as you put less than about 5 values in results,
you can assume it is large enough. */
+/* FIXME, remove these functions, they are here to verify the sysfs conversion
+ * is correct, or not */
+__attribute__((unused))
static void via686a_in(struct i2c_client *client, int operation, int ctl_name,
int *nrels_mag, long *results)
{
@@ -780,7 +754,8 @@
}
}
-void via686a_fan(struct i2c_client *client, int operation, int ctl_name,
+__attribute__((unused))
+static void via686a_fan(struct i2c_client *client, int operation, int ctl_name,
int *nrels_mag, long *results)
{
struct via686a_data *data = i2c_get_clientdata(client);
@@ -808,7 +783,8 @@
}
}
-void via686a_temp(struct i2c_client *client, int operation, int ctl_name,
+__attribute__((unused))
+static void via686a_temp(struct i2c_client *client, int operation, int ctl_name,
int *nrels_mag, long *results)
{
struct via686a_data *data = i2c_get_clientdata(client);
@@ -838,7 +814,8 @@
}
}
-void via686a_alarms(struct i2c_client *client, int operation, int ctl_name,
+__attribute__((unused))
+static void via686a_alarms(struct i2c_client *client, int operation, int ctl_name,
int *nrels_mag, long *results)
{
struct via686a_data *data = i2c_get_clientdata(client);
@@ -851,7 +828,8 @@
}
}
-void via686a_fan_div(struct i2c_client *client, int operation,
+__attribute__((unused))
+static void via686a_fan_div(struct i2c_client *client, int operation,
int ctl_name, int *nrels_mag, long *results)
{
struct via686a_data *data = i2c_get_clientdata(client);
next prev parent reply other threads:[~2003-04-03 0:03 UTC|newest]
Thread overview: 92+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-03 0:14 [BK PATCH] More i2c driver changes for 2.5.66 Greg KH
2003-04-03 0:15 ` [PATCH] " Greg KH
2003-04-03 0:15 ` Greg KH
2003-04-03 0:15 ` Greg KH
2003-04-03 0:15 ` Greg KH
2003-04-03 0:15 ` Greg KH
2003-04-03 0:15 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-04-03 0:15 ` Greg KH [this message]
2003-04-03 0:15 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-04-03 0:15 ` Greg KH
2003-04-03 0:15 ` Greg KH
2003-04-03 0:15 ` Greg KH
2003-04-03 0:15 ` Greg KH
2003-04-03 0:15 ` Greg KH
2003-04-03 0:15 ` Greg KH
2003-04-03 0:15 ` Greg KH
2003-04-03 6:21 ` Albert Cranford
2005-05-19 6:23 ` Albert Cranford
2003-04-03 6:33 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-04-03 13:06 ` Albert Cranford
2005-05-19 6:23 ` Albert Cranford
2003-04-03 16:37 ` Greg KH
2005-05-19 6:23 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2003-06-11 20:35 [BK PATCH] More i2c driver changes for 2.5.70 Greg KH
2005-05-19 6:23 ` Greg KH
2003-06-11 20:36 ` [PATCH] " Greg KH
2005-05-19 6:23 ` Greg KH
2003-06-11 20:36 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-06-11 20:36 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-06-11 20:36 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-06-11 20:36 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-06-11 20:36 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-06-12 2:40 ` Philip Pokorny
2005-05-19 6:23 ` Philip Pokorny
2003-05-09 23:55 [BK PATCH] More i2c driver changes for 2.5.69 Greg KH
2005-05-19 6:23 ` Greg KH
2003-05-09 23:56 ` [PATCH] " Greg KH
2005-05-19 6:23 ` Greg KH
2003-05-09 23:56 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-05-09 23:56 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-05-09 23:56 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-05-09 23:56 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-05-09 23:56 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-22 1:04 [BK PATCH] More i2c driver changes for 2.5.65 Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-22 1:04 ` [PATCH] " Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-22 1:04 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-22 1:04 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-22 1:04 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-22 1:04 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-22 1:04 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-22 1:04 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-22 1:04 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-22 1:04 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-25 9:35 ` Pavel Machek
2005-05-19 6:23 ` Pavel Machek
2003-03-25 1:29 ` Greg KH
2005-05-19 6:23 ` Greg KH
2003-03-25 2:04 ` Dave Jones
2005-05-19 6:23 ` Dave Jones
2003-03-25 3:34 ` Greg KH
2005-05-19 6:23 ` Greg KH
2005-05-19 6:23 ` [PATCH] More i2c driver changes for 2.5.66 Mark M. Hoffman
2005-05-19 6:23 ` Albert Cranford
2005-05-19 6:23 ` Greg KH
2005-05-19 6:23 ` [PATCH] More i2c driver changes for 2.5.69 Philip Pokorny
2003-03-22 2:33 ` [PATCH] More i2c driver changes for 2.5.65 Petr Vandrovec
2005-05-19 6:23 ` Petr Vandrovec
2003-03-23 8:49 ` Greg KH
2005-05-19 6:23 ` 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=10493289582408@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.