]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
hwrng: bcm2835 - Move MODULE_DEVICE_TABLE() to table definition
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 7 Nov 2025 08:15:48 +0000 (09:15 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 14 Nov 2025 10:15:48 +0000 (18:15 +0800)
Convention is to place MODULE_DEVICE_TABLE() immediately after
definition of the affected table, so one can easily spot missing such.
There is on the other hand no benefits of putting MODULE_DEVICE_TABLE()
far away.

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/bcm2835-rng.c

index aa2b135e3ee230ac43c7fb7d01a523ba2e4460b4..0b67cfd15b11e0add95cfb91a57fd9d5239ef3ed 100644 (file)
@@ -138,6 +138,7 @@ static const struct of_device_id bcm2835_rng_of_match[] = {
        { .compatible = "brcm,bcm6368-rng"},
        {},
 };
+MODULE_DEVICE_TABLE(of, bcm2835_rng_of_match);
 
 static int bcm2835_rng_probe(struct platform_device *pdev)
 {
@@ -191,8 +192,6 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
        return err;
 }
 
-MODULE_DEVICE_TABLE(of, bcm2835_rng_of_match);
-
 static const struct platform_device_id bcm2835_rng_devtype[] = {
        { .name = "bcm2835-rng" },
        { .name = "bcm63xx-rng" },