]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: atmel-i2c - Replace hard-coded bus clock rate with constant
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 23 Feb 2026 16:57:37 +0000 (17:57 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 7 Mar 2026 05:12:20 +0000 (14:12 +0900)
Replace 1000000L with I2C_MAX_FAST_MODE_PLUS_FREQ.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-i2c.c

index 59d11fa5caebc8f95f707215e9620877e4e443e7..0e275dbdc8c5508f99b492227c1705773776ab3c 100644 (file)
@@ -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;