All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 3/6] libsensors4: Don't substitute the isa
Date: Wed, 15 Aug 2007 16:56:36 +0000	[thread overview]
Message-ID: <46C33044.9000508@hhs.nl> (raw)
In-Reply-To: <20070815174020.055f6ea3@hyperion>

Jean Delvare wrote:
> Don't handle the isa bus in sensors_parse_i2cbus_name(). We really
> don't need to, as there is a single ISA bus, there's no need for
> substituting anything.
> 

This one requires deeper knowledge of libsensors then I have.

I can still test it though :)

Regards,

Hans


> ---
>  lib/data.c  |    4 ----
>  lib/sysfs.c |   10 ++++------
>  2 files changed, 4 insertions(+), 10 deletions(-)
> 
> --- lm-sensors-3.orig/lib/data.c	2007-08-15 12:14:51.000000000 +0200
> +++ lm-sensors-3/lib/data.c	2007-08-15 12:14:55.000000000 +0200
> @@ -190,10 +190,6 @@ int sensors_parse_i2cbus_name(const char
>  {
>    int i;
>  
> -  if (! strcmp(name,"isa")) {
> -    *res = SENSORS_CHIP_NAME_BUS_ISA;
> -    return 0;
> -  }
>    if (strncmp(name,"i2c-",4)) {
>      return -SENSORS_ERR_BUS_NAME;
>    }
> --- lm-sensors-3.orig/lib/sysfs.c	2007-08-15 12:14:51.000000000 +0200
> +++ lm-sensors-3/lib/sysfs.c	2007-08-15 12:14:55.000000000 +0200
> @@ -374,17 +374,15 @@ int sensors_read_sysfs_bus(void)
>  		      (attr = sysfs_get_device_attr(dev, "name"))))
>  			continue;
>  
> +		if (sscanf(clsdev->name, "i2c-%d", &entry.number) != 1 ||
> +		    entry.number = 9191) /* legacy ISA */
> +			continue;
> +
>  		/* NB: attr->value[attr->len-1] = '\n'; chop that off */
>  		entry.adapter = strndup(attr->value, attr->len - 1);
>  		if (!entry.adapter)
>  			sensors_fatal_error(__FUNCTION__, "out of memory");
>  
> -		if (!strncmp(entry.adapter, "ISA ", 4)) {
> -			entry.number = SENSORS_CHIP_NAME_BUS_ISA;
> -		} else if (sscanf(clsdev->name, "i2c-%d", &entry.number) != 1) {
> -			continue;
> -		}
> -
>  		sensors_add_proc_bus(&entry);
>  	}
>  
> 
> 


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2007-08-15 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15 15:40 [lm-sensors] [PATCH 3/6] libsensors4: Don't substitute the isa bus Jean Delvare
2007-08-15 16:56 ` Hans de Goede [this message]
2007-08-16  7:40 ` [lm-sensors] [PATCH 3/6] libsensors4: Don't substitute the isa Jean Delvare

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=46C33044.9000508@hhs.nl \
    --to=j.w.r.degoede@hhs.nl \
    --cc=lm-sensors@vger.kernel.org \
    /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.