Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 3f5f746

Browse files
Rubuschherbertx
authored andcommitted
crypto: atmel-i2c - rename read function
Make the memory read function name more specific to the read memory zone. The Atmel SHA204 chips provide config, otp and data zone. The implemented read function in fact only reads some fields in zone config. The function renaming allows for a uniform naming scheme when reading from other memory zones. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent e228b41 commit 3f5f746

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/crypto/atmel-i2c.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static void atmel_i2c_checksum(struct atmel_i2c_cmd *cmd)
5151
*__crc16 = cpu_to_le16(bitrev16(crc16(0, data, len)));
5252
}
5353

54-
void atmel_i2c_init_read_cmd(struct atmel_i2c_cmd *cmd)
54+
void atmel_i2c_init_read_config_cmd(struct atmel_i2c_cmd *cmd)
5555
{
5656
cmd->word_addr = COMMAND;
5757
cmd->opcode = OPCODE_READ;
@@ -68,7 +68,7 @@ void atmel_i2c_init_read_cmd(struct atmel_i2c_cmd *cmd)
6868
cmd->msecs = MAX_EXEC_TIME_READ;
6969
cmd->rxsize = READ_RSP_SIZE;
7070
}
71-
EXPORT_SYMBOL(atmel_i2c_init_read_cmd);
71+
EXPORT_SYMBOL(atmel_i2c_init_read_config_cmd);
7272

7373
void atmel_i2c_init_random_cmd(struct atmel_i2c_cmd *cmd)
7474
{
@@ -301,7 +301,7 @@ static int device_sanity_check(struct i2c_client *client)
301301
if (!cmd)
302302
return -ENOMEM;
303303

304-
atmel_i2c_init_read_cmd(cmd);
304+
atmel_i2c_init_read_config_cmd(cmd);
305305

306306
ret = atmel_i2c_send_receive(client, cmd);
307307
if (ret)

drivers/crypto/atmel-i2c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void atmel_i2c_flush_queue(void);
178178

179179
int atmel_i2c_send_receive(struct i2c_client *client, struct atmel_i2c_cmd *cmd);
180180

181-
void atmel_i2c_init_read_cmd(struct atmel_i2c_cmd *cmd);
181+
void atmel_i2c_init_read_config_cmd(struct atmel_i2c_cmd *cmd);
182182
void atmel_i2c_init_random_cmd(struct atmel_i2c_cmd *cmd);
183183
void atmel_i2c_init_genkey_cmd(struct atmel_i2c_cmd *cmd, u16 keyid);
184184
int atmel_i2c_init_ecdh_cmd(struct atmel_i2c_cmd *cmd,

0 commit comments

Comments
 (0)