[PATCH] crypto: atmel-i2c - Replace hard-coded bus clock rate with constant

Thorsten Blum posted 1 patch 1 month, 1 week ago
drivers/crypto/atmel-i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] crypto: atmel-i2c - Replace hard-coded bus clock rate with constant
Posted by Thorsten Blum 1 month, 1 week ago
Replace 1000000L with I2C_MAX_FAST_MODE_PLUS_FREQ.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 drivers/crypto/atmel-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/atmel-i2c.c b/drivers/crypto/atmel-i2c.c
index ba9d3f593601..316a0ad53cf6 100644
--- a/drivers/crypto/atmel-i2c.c
+++ b/drivers/crypto/atmel-i2c.c
@@ -370,7 +370,7 @@ int atmel_i2c_probe(struct i2c_client *client)
 		}
 	}
 
-	if (bus_clk_rate > 1000000L) {
+	if (bus_clk_rate > I2C_MAX_FAST_MODE_PLUS_FREQ) {
 		dev_err(dev, "%u exceeds maximum supported clock frequency (1MHz)\n",
 			bus_clk_rate);
 		return -EINVAL;
-- 
Thorsten Blum <thorsten.blum@linux.dev>
GPG: 1D60 735E 8AEF 3BE4 73B6  9D84 7336 78FD 8DFE EAD4
Re: [PATCH] crypto: atmel-i2c - Replace hard-coded bus clock rate with constant
Posted by Herbert Xu 4 weeks, 1 day ago
On Mon, Feb 23, 2026 at 05:57:37PM +0100, Thorsten Blum wrote:
> Replace 1000000L with I2C_MAX_FAST_MODE_PLUS_FREQ.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  drivers/crypto/atmel-i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt