aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2006-09-03 16:24:00 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 18:38:52 -0400
commit7eff82c8b1511017ae605f0c99ac275a7e21b867 (patch)
tree1201c99e9730a4e1a878560bf22a623a3a7e79f2 /drivers/i2c
parent9b4ccb86b4abe644ffd218720da2f942b6a20fc2 (diff)
i2c-core: Drop useless bitmaskings
i2c-core: Drop useless bitmaskings The code generated is exactly the same. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/i2c-core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 36e1214b0b1d..88dd803174a1 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -901,7 +901,7 @@ s32 i2c_smbus_read_byte(struct i2c_client *client)
901 I2C_SMBUS_READ,0,I2C_SMBUS_BYTE, &data)) 901 I2C_SMBUS_READ,0,I2C_SMBUS_BYTE, &data))
902 return -1; 902 return -1;
903 else 903 else
904 return 0x0FF & data.byte; 904 return data.byte;
905} 905}
906 906
907s32 i2c_smbus_write_byte(struct i2c_client *client, u8 value) 907s32 i2c_smbus_write_byte(struct i2c_client *client, u8 value)
@@ -917,7 +917,7 @@ s32 i2c_smbus_read_byte_data(struct i2c_client *client, u8 command)
917 I2C_SMBUS_READ,command, I2C_SMBUS_BYTE_DATA,&data)) 917 I2C_SMBUS_READ,command, I2C_SMBUS_BYTE_DATA,&data))
918 return -1; 918 return -1;
919 else 919 else
920 return 0x0FF & data.byte; 920 return data.byte;
921} 921}
922 922
923s32 i2c_smbus_write_byte_data(struct i2c_client *client, u8 command, u8 value) 923s32 i2c_smbus_write_byte_data(struct i2c_client *client, u8 command, u8 value)
@@ -936,7 +936,7 @@ s32 i2c_smbus_read_word_data(struct i2c_client *client, u8 command)
936 I2C_SMBUS_READ,command, I2C_SMBUS_WORD_DATA, &data)) 936 I2C_SMBUS_READ,command, I2C_SMBUS_WORD_DATA, &data))
937 return -1; 937 return -1;
938 else 938 else
939 return 0x0FFFF & data.word; 939 return data.word;
940} 940}
941 941
942s32 i2c_smbus_write_word_data(struct i2c_client *client, u8 command, u16 value) 942s32 i2c_smbus_write_word_data(struct i2c_client *client, u8 command, u16 value)
@@ -1039,7 +1039,7 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter * adapter, u16 addr,
1039 else { 1039 else {
1040 msg[0].len=3; 1040 msg[0].len=3;
1041 msgbuf0[1] = data->word & 0xff; 1041 msgbuf0[1] = data->word & 0xff;
1042 msgbuf0[2] = (data->word >> 8) & 0xff; 1042 msgbuf0[2] = data->word >> 8;
1043 } 1043 }
1044 break; 1044 break;
1045 case I2C_SMBUS_PROC_CALL: 1045 case I2C_SMBUS_PROC_CALL:
@@ -1048,7 +1048,7 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter * adapter, u16 addr,
1048 msg[0].len = 3; 1048 msg[0].len = 3;
1049 msg[1].len = 2; 1049 msg[1].len = 2;
1050 msgbuf0[1] = data->word & 0xff; 1050 msgbuf0[1] = data->word & 0xff;
1051 msgbuf0[2] = (data->word >> 8) & 0xff; 1051 msgbuf0[2] = data->word >> 8;
1052 break; 1052 break;
1053 case I2C_SMBUS_BLOCK_DATA: 1053 case I2C_SMBUS_BLOCK_DATA:
1054 if (read_write == I2C_SMBUS_READ) { 1054 if (read_write == I2C_SMBUS_READ) {