i2c-ali1535: Fix style issues
This is a fix-style patch for i2c-ali1535 (issues reported by checkpatch.pl.) Signed-off-by: LABBE Corentin <corentin.labbe@geomatys.fr> Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
b6844e8f64
commit
3fea5df41d
@ -1,23 +1,23 @@
|
||||
/*
|
||||
Copyright (c) 2000 Frodo Looijaard <frodol@dds.nl>,
|
||||
Philip Edelbrock <phil@netroedge.com>,
|
||||
Mark D. Studebaker <mdsxyz123@yahoo.com>,
|
||||
Dan Eaton <dan.eaton@rocketlogix.com> and
|
||||
Stephen Rousset<stephen.rousset@rocketlogix.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Copyright (c) 2000 Frodo Looijaard <frodol@dds.nl>,
|
||||
* Philip Edelbrock <phil@netroedge.com>,
|
||||
* Mark D. Studebaker <mdsxyz123@yahoo.com>,
|
||||
* Dan Eaton <dan.eaton@rocketlogix.com> and
|
||||
* Stephen Rousset <stephen.rousset@rocketlogix.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -254,8 +254,8 @@ static int ali1535_transaction(struct i2c_adapter *adap)
|
||||
if (temp & (ALI1535_STS_ERR | ALI1535_STS_BUSY)) {
|
||||
/* do a clear-on-write */
|
||||
outb_p(0xFF, SMBHSTSTS);
|
||||
if ((temp = inb_p(SMBHSTSTS)) &
|
||||
(ALI1535_STS_ERR | ALI1535_STS_BUSY)) {
|
||||
temp = inb_p(SMBHSTSTS);
|
||||
if (temp & (ALI1535_STS_ERR | ALI1535_STS_BUSY)) {
|
||||
/* This is probably going to be correctable only by a
|
||||
* power reset as one of the bits now appears to be
|
||||
* stuck */
|
||||
@ -267,10 +267,9 @@ static int ali1535_transaction(struct i2c_adapter *adap)
|
||||
}
|
||||
} else {
|
||||
/* check and clear done bit */
|
||||
if (temp & ALI1535_STS_DONE) {
|
||||
if (temp & ALI1535_STS_DONE)
|
||||
outb_p(temp, SMBHSTSTS);
|
||||
}
|
||||
}
|
||||
|
||||
/* start the transaction by writing anything to the start register */
|
||||
outb_p(0xFF, SMBHSTPORT);
|
||||
@ -278,7 +277,7 @@ static int ali1535_transaction(struct i2c_adapter *adap)
|
||||
/* We will always wait for a fraction of a second! */
|
||||
timeout = 0;
|
||||
do {
|
||||
msleep(1);
|
||||
usleep_range(1000, 2000);
|
||||
temp = inb_p(SMBHSTSTS);
|
||||
} while (((temp & ALI1535_STS_BUSY) && !(temp & ALI1535_STS_IDLE))
|
||||
&& (timeout++ < MAX_TIMEOUT));
|
||||
@ -351,7 +350,7 @@ static s32 ali1535_access(struct i2c_adapter *adap, u16 addr,
|
||||
for (timeout = 0;
|
||||
(timeout < MAX_TIMEOUT) && !(temp & ALI1535_STS_IDLE);
|
||||
timeout++) {
|
||||
msleep(1);
|
||||
usleep_range(1000, 2000);
|
||||
temp = inb_p(SMBHSTSTS);
|
||||
}
|
||||
if (timeout >= MAX_TIMEOUT)
|
||||
@ -480,7 +479,7 @@ static struct i2c_adapter ali1535_adapter = {
|
||||
.algo = &smbus_algorithm,
|
||||
};
|
||||
|
||||
static const struct pci_device_id ali1535_ids[] = {
|
||||
static DEFINE_PCI_DEVICE_TABLE(ali1535_ids) = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101) },
|
||||
{ },
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user