linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] i2c driver changes for 2.5.68
Date: Thu, 24 Apr 2003 16:59:06 -0700	[thread overview]
Message-ID: <10512287462983@kroah.com> (raw)
In-Reply-To: <1051228746897@kroah.com>

ChangeSet 1.1179.3.2, 2003/04/23 11:33:09-07:00, hch@lst.de

[PATCH] i2c: remove dead code from adm1021

Enough testing :)  This is the last user of some junk in i2c-sensors.h,
so it should better go away sooner than later..


 drivers/i2c/chips/adm1021.c |  122 --------------------------------------------
 1 files changed, 122 deletions(-)


diff -Nru a/drivers/i2c/chips/adm1021.c b/drivers/i2c/chips/adm1021.c
--- a/drivers/i2c/chips/adm1021.c	Thu Apr 24 16:47:35 2003
+++ b/drivers/i2c/chips/adm1021.c	Thu Apr 24 16:47:35 2003
@@ -416,128 +416,6 @@
 	up(&data->update_lock);
 }
 
-
-/* FIXME, remove these four functions, they are here to verify the sysfs
- * conversion is correct, or not */
-__attribute__((unused))
-static void adm1021_temp(struct i2c_client *client, int operation,
-			 int ctl_name, int *nrels_mag, long *results)
-{
-	struct adm1021_data *data = i2c_get_clientdata(client);
-
-	if (operation == SENSORS_PROC_REAL_INFO)
-		*nrels_mag = 0;
-	else if (operation == SENSORS_PROC_REAL_READ) {
-		adm1021_update_client(client);
-		results[0] = TEMP_FROM_REG(data->temp_max);
-		results[1] = TEMP_FROM_REG(data->temp_hyst);
-		results[2] = TEMP_FROM_REG(data->temp_input);
-		*nrels_mag = 3;
-	} else if (operation == SENSORS_PROC_REAL_WRITE) {
-		if (*nrels_mag >= 1) {
-			data->temp_max = TEMP_TO_REG(results[0]);
-			adm1021_write_value(client, ADM1021_REG_TOS_W,
-					    data->temp_max);
-		}
-		if (*nrels_mag >= 2) {
-			data->temp_hyst = TEMP_TO_REG(results[1]);
-			adm1021_write_value(client, ADM1021_REG_THYST_W,
-					    data->temp_hyst);
-		}
-	}
-}
-
-__attribute__((unused))
-static void adm1021_remote_temp(struct i2c_client *client, int operation,
-				int ctl_name, int *nrels_mag, long *results)
-{
-	struct adm1021_data *data = i2c_get_clientdata(client);
-	int prec = 0;
-
-	if (operation == SENSORS_PROC_REAL_INFO)
-		if (data->type == adm1023) { *nrels_mag = 3; }
-                 else { *nrels_mag = 0; }
-	else if (operation == SENSORS_PROC_REAL_READ) {
-		adm1021_update_client(client);
-		results[0] = TEMP_FROM_REG(data->remote_temp_max);
-		results[1] = TEMP_FROM_REG(data->remote_temp_hyst);
-		results[2] = TEMP_FROM_REG(data->remote_temp_input);
-		if (data->type == adm1023) {
-			results[0] = results[0]*1000 + ((data->remote_temp_os_prec >> 5) * 125);
-			results[1] = results[1]*1000 + ((data->remote_temp_hyst_prec >> 5) * 125);
-			results[2] = (TEMP_FROM_REG(data->remote_temp_offset)*1000) + ((data->remote_temp_offset_prec >> 5) * 125);
-			results[3] = (TEMP_FROM_REG(data->remote_temp_input)*1000) + ((data->remote_temp_prec >> 5) * 125);
-			*nrels_mag = 4;
-		} else {
- 			*nrels_mag = 3;
-		}
-	} else if (operation == SENSORS_PROC_REAL_WRITE) {
-		if (*nrels_mag >= 1) {
-			if (data->type == adm1023) {
-				prec = ((results[0]-((results[0]/1000)*1000))/125)<<5;
-				adm1021_write_value(client, ADM1021_REG_REM_TOS_PREC, prec);
-				results[0] = results[0]/1000;
-				data->remote_temp_os_prec=prec;
-			}
-			data->remote_temp_max = TEMP_TO_REG(results[0]);
-			adm1021_write_value(client, ADM1021_REG_REMOTE_TOS_W, data->remote_temp_max);
-		}
-		if (*nrels_mag >= 2) {
-			if (data->type == adm1023) {
-				prec = ((results[1]-((results[1]/1000)*1000))/125)<<5;
-				adm1021_write_value(client, ADM1021_REG_REM_THYST_PREC, prec);
-				results[1] = results[1]/1000;
-				data->remote_temp_hyst_prec=prec;
-			}
-			data->remote_temp_hyst = TEMP_TO_REG(results[1]);
-			adm1021_write_value(client, ADM1021_REG_REMOTE_THYST_W, data->remote_temp_hyst);
-		}
-		if (*nrels_mag >= 3) {
-			if (data->type == adm1023) {
-				prec = ((results[2]-((results[2]/1000)*1000))/125)<<5;
-				adm1021_write_value(client, ADM1021_REG_REM_OFFSET_PREC, prec);
-				results[2]=results[2]/1000;
-				data->remote_temp_offset_prec=prec;
-				data->remote_temp_offset=results[2];
-				adm1021_write_value(client, ADM1021_REG_REM_OFFSET, data->remote_temp_offset);
-			}
-		}
-	}
-}
-
-__attribute__((unused))
-static void adm1021_die_code(struct i2c_client *client, int operation,
-			     int ctl_name, int *nrels_mag, long *results)
-{
-	struct adm1021_data *data = i2c_get_clientdata(client);
-
-	if (operation == SENSORS_PROC_REAL_INFO)
-		*nrels_mag = 0;
-	else if (operation == SENSORS_PROC_REAL_READ) {
-		adm1021_update_client(client);
-		results[0] = data->die_code;
-		*nrels_mag = 1;
-	} else if (operation == SENSORS_PROC_REAL_WRITE) {
-		/* Can't write to it */
-	}
-}
-
-__attribute__((unused))
-static void adm1021_alarms(struct i2c_client *client, int operation,
-			   int ctl_name, int *nrels_mag, long *results)
-{
-	struct adm1021_data *data = i2c_get_clientdata(client);
-	if (operation == SENSORS_PROC_REAL_INFO)
-		*nrels_mag = 0;
-	else if (operation == SENSORS_PROC_REAL_READ) {
-		adm1021_update_client(client);
-		results[0] = data->alarms;
-		*nrels_mag = 1;
-	} else if (operation == SENSORS_PROC_REAL_WRITE) {
-		/* Can't write to it */
-	}
-}
-
 static int __init sensors_adm1021_init(void)
 {
 	return i2c_add_driver(&adm1021_driver);


  reply	other threads:[~2003-04-24 23:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-24 23:58 [BK PATCH] i2c driver changes for 2.5.68 Greg KH
2003-04-24 23:59 ` [PATCH] " Greg KH
2003-04-24 23:59   ` Greg KH [this message]
2003-04-24 23:59     ` Greg KH
2003-04-24 23:59       ` Greg KH
2003-04-24 23:59         ` Greg KH
2003-04-24 23:59           ` Greg KH
2003-04-24 23:59             ` Greg KH
2003-04-24 23:59               ` Greg KH
2003-04-24 23:59                 ` Greg KH
2003-04-24 23:59                   ` 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=10512287462983@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;
as well as URLs for NNTP newsgroup(s).