aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/et131x/et1310_eeprom.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-10-06 15:46:24 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 12:23:05 -0800
commit53f8aeef7d85046b826fb02e45a97bd6d74e6910 (patch)
treecc45d0ff2f6e9be44586478a7993ace9b958d1e2 /drivers/staging/et131x/et1310_eeprom.c
parentStaging: slicoss: remove duplicate structure field initialization (diff)
downloadlinux-dev-53f8aeef7d85046b826fb02e45a97bd6d74e6910.tar.xz
linux-dev-53f8aeef7d85046b826fb02e45a97bd6d74e6910.zip
Staging: et131x: kill SUCCESS and FAILURE defines
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x/et1310_eeprom.c')
-rw-r--r--drivers/staging/et131x/et1310_eeprom.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/et131x/et1310_eeprom.c b/drivers/staging/et131x/et1310_eeprom.c
index c853a2c243a8..520a7c938c39 100644
--- a/drivers/staging/et131x/et1310_eeprom.c
+++ b/drivers/staging/et131x/et1310_eeprom.c
@@ -146,7 +146,7 @@
* @addr: the address to write
* @data: the value to write
*
- * Returns SUCCESS or FAILURE
+ * Returns 1 for a successful write.
*/
int EepromWriteByte(struct et131x_adapter *etdev, u32 addr, u8 data)
{
@@ -227,7 +227,7 @@ int EepromWriteByte(struct et131x_adapter *etdev, u32 addr, u8 data)
}
if (err || (index >= MAX_NUM_REGISTER_POLLS))
- return FAILURE;
+ return 0;
/* Step 2: */
control = 0;
@@ -235,7 +235,7 @@ int EepromWriteByte(struct et131x_adapter *etdev, u32 addr, u8 data)
if (pci_write_config_byte(pdev, LBCIF_CONTROL_REGISTER_OFFSET,
control)) {
- return FAILURE;
+ return 0;
}
i2c_wack = 1;
@@ -334,7 +334,7 @@ int EepromWriteByte(struct et131x_adapter *etdev, u32 addr, u8 data)
index++;
}
- return writeok ? SUCCESS : FAILURE;
+ return writeok;
}
/**
@@ -345,7 +345,7 @@ int EepromWriteByte(struct et131x_adapter *etdev, u32 addr, u8 data)
* @eeprom_id: the ID of the EEPROM
* @addrmode: how the EEPROM is to be accessed
*
- * Returns SUCCESS or FAILURE
+ * Returns 1 for a successful read
*/
int EepromReadByte(struct et131x_adapter *etdev, u32 addr, u8 *pdata)
{
@@ -409,7 +409,7 @@ int EepromReadByte(struct et131x_adapter *etdev, u32 addr, u8 *pdata)
}
if (err || (index >= MAX_NUM_REGISTER_POLLS))
- return FAILURE;
+ return 0;
/* Step 2: */
control = 0;
@@ -417,14 +417,14 @@ int EepromReadByte(struct et131x_adapter *etdev, u32 addr, u8 *pdata)
if (pci_write_config_byte(pdev, LBCIF_CONTROL_REGISTER_OFFSET,
control)) {
- return FAILURE;
+ return 0;
}
/* Step 3: */
if (pci_write_config_dword(pdev, LBCIF_ADDRESS_REGISTER_OFFSET,
addr)) {
- return FAILURE;
+ return 0;
}
/* Step 4: */
@@ -446,10 +446,10 @@ int EepromReadByte(struct et131x_adapter *etdev, u32 addr, u8 *pdata)
}
if (err || (index >= MAX_NUM_REGISTER_POLLS))
- return FAILURE;
+ return 0;
/* Step 6: */
*pdata = EXTRACT_DATA_REGISTER(dword1);
- return (status & LBCIF_STATUS_ACK_ERROR) ? FAILURE : SUCCESS;
+ return (status & LBCIF_STATUS_ACK_ERROR) ? 0 : 1;
}