All of lore.kernel.org
 help / color / mirror / Atom feed
From: j.w.r.degoede@hhs.nl (Hans de Goede)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] Patch: abituguru driver version 1.1.1
Date: Sat, 28 Jan 2006 10:20:53 +0000	[thread overview]
Message-ID: <43DB4585.3010404@hhs.nl> (raw)
In-Reply-To: <43AD5940.1090900@hhs.nl>

One last reply to a remark which I mist yesterday:

>> 	/* After this the ABIT_UGURU_DATA port should contain
>> 	   ABIT_UGURU_STATUS_INPUT */
>> 	while(inb_p(client->addr+ABIT_UGURU_DATA) != ABIT_UGURU_STATUS_INPUT){
>> 		timeout--;
>> 		if (timeout = 0) {
>> #if ABIT_UGURU_DEBUG_LEVEL >= 1
>> 			printk(KERN_DEBUG "abituguru: error: state != more input after ready command\n");
>> #endif	
> dev_dbg
>> 			return -EIO;
>> 		}
> Maybe you should also lock access (mutex
> or semaphore, see Linux device drivers third edition as pdf) to the chip in _read _write functions so no other
> concurrect access to achip from different part of driver  could occur.
> 

This is already taken care of. The detect_sensor_type function where 
this comments was made is called before i2c_client_register, thus none 
of the sysfs show/store will get called, so no race.

All the sysfs show/store functions either call abituguru_update_data 
which does locking, or do the locking themselves directly. This locking 
of the data thus protects against any races involving simultanious use 
of read/write functions.

Regards,

Hans


      parent reply	other threads:[~2006-01-28 10:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-24 14:20 [lm-sensors] Patch: abituguru driver version 1.1.1 Hans de Goede
2005-12-24 20:33 ` Jim Cromie
2005-12-25  7:21 ` Hans de Goede
2006-01-24 15:18 ` Rudolf Marek
2006-01-27 20:15 ` Hans de Goede
2006-01-28 10:20 ` Hans de Goede [this message]

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=43DB4585.3010404@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.