diff options
author | Peter Robinson <pbrobinson@gmail.com> | 2018-03-03 22:51:13 +0000 |
---|---|---|
committer | Peter Robinson <pbrobinson@gmail.com> | 2018-03-03 22:51:13 +0000 |
commit | 60e272367a705ccdb067c5b1e33f28dfb9fea0b9 (patch) | |
tree | b03ec11acd4b265daf323239ff788394a8354b60 /bcm2835-hwrng-Handle-deferred-clock-properly.patch | |
parent | 5860e766a687094612f3c37a219f248078148541 (diff) | |
download | kernel-60e272367a705ccdb067c5b1e33f28dfb9fea0b9.tar.gz kernel-60e272367a705ccdb067c5b1e33f28dfb9fea0b9.tar.xz kernel-60e272367a705ccdb067c5b1e33f28dfb9fea0b9.zip |
Add RPi3 GPIO expander, RPi fixes, OMAP serial update, general ARM fixes
Diffstat (limited to 'bcm2835-hwrng-Handle-deferred-clock-properly.patch')
-rw-r--r-- | bcm2835-hwrng-Handle-deferred-clock-properly.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/bcm2835-hwrng-Handle-deferred-clock-properly.patch b/bcm2835-hwrng-Handle-deferred-clock-properly.patch new file mode 100644 index 000000000..4b4cdfea0 --- /dev/null +++ b/bcm2835-hwrng-Handle-deferred-clock-properly.patch @@ -0,0 +1,42 @@ +From patchwork Mon Feb 12 20:11:36 2018 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: hwrng: bcm2835: Handle deferred clock properly +From: Stefan Wahren <stefan.wahren@i2se.com> +X-Patchwork-Id: 10214385 +Message-Id: <1518466296-30161-1-git-send-email-stefan.wahren@i2se.com> +To: Herbert Xu <herbert@gondor.apana.org.au>, Matt Mackall <mpm@selenic.com> +Cc: Stefan Wahren <stefan.wahren@i2se.com>, + Florian Fainelli <f.fainelli@gmail.com>, Arnd Bergmann <arnd@arndb.de>, + Scott Branden <sbranden@broadcom.com>, Jon Mason <jonmason@broadcom.com>, + Greg Kroah-Hartman <gregkh@linuxfoundation.org>, + Eric Anholt <eric@anholt.net>, + bcm-kernel-feedback-list@broadcom.com, linux-crypto@vger.kernel.org, + Ray Jui <rjui@broadcom.com>, linux-arm-kernel@lists.infradead.org +Date: Mon, 12 Feb 2018 21:11:36 +0100 + +In case the probe of the clock is deferred, we would assume it is +optional. This is wrong, so defer the probe of this driver until +the clock is available. + +Fixes: 791af4f4907a ("hwrng: bcm2835 - Manage an optional clock") +Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> +Acked-by: Florian Fainelli <f.fainelli@gmail.com> +--- + drivers/char/hw_random/bcm2835-rng.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c +index 7a84cec..6767d96 100644 +--- a/drivers/char/hw_random/bcm2835-rng.c ++++ b/drivers/char/hw_random/bcm2835-rng.c +@@ -163,6 +163,8 @@ static int bcm2835_rng_probe(struct platform_device *pdev) + + /* Clock is optional on most platforms */ + priv->clk = devm_clk_get(dev, NULL); ++ if (IS_ERR(priv->clk) && PTR_ERR(priv->clk) == -EPROBE_DEFER) ++ return -EPROBE_DEFER; + + priv->rng.name = pdev->name; + priv->rng.init = bcm2835_rng_init; |