2013-01-15 20:53:02

by Mark Greer

[permalink] [raw]
Subject: [PATCH] crypto: omap-sham - Fix compile errors when CONFIG_OF not defined

From: "Mark A. Greer" <[email protected]>

Fix the compile errors created by commit 2545e8d
(crypto: omap-sham - Add Device Tree Support)
when CONFIG_OF is not defined. This includes
changing omap_sham_get_res_dev() to omap_sham_get_res_of()
and creating an empty version of omap_sham_of_match[].

Signed-off-by: Mark A. Greer <[email protected]>
---
drivers/crypto/omap-sham.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index edff981..dc2d354 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -1607,7 +1607,11 @@ err:
return err;
}
#else
-static int omap_sham_get_res_dev(struct omap_sham_dev *dd,
+static const struct of_device_id omap_sham_of_match[] = {
+ {},
+};
+
+static int omap_sham_get_res_of(struct omap_sham_dev *dd,
struct device *dev, struct resource *res)
{
return -EINVAL;
--
1.7.12



2013-01-15 23:36:35

by Mark Greer

[permalink] [raw]
Subject: Re: [PATCH] crypto: omap-sham - Fix compile errors when CONFIG_OF not defined

On Tue, Jan 15, 2013 at 01:53:02PM -0700, Mark A. Greer wrote:
> From: "Mark A. Greer" <[email protected]>
>
> Fix the compile errors created by commit 2545e8d
> (crypto: omap-sham - Add Device Tree Support)
> when CONFIG_OF is not defined. This includes
> changing omap_sham_get_res_dev() to omap_sham_get_res_of()
> and creating an empty version of omap_sham_of_match[].
>
> Signed-off-by: Mark A. Greer <[email protected]>
> ---
> drivers/crypto/omap-sham.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
> index edff981..dc2d354 100644
> --- a/drivers/crypto/omap-sham.c
> +++ b/drivers/crypto/omap-sham.c
> @@ -1607,7 +1607,11 @@ err:
> return err;
> }
> #else
> -static int omap_sham_get_res_dev(struct omap_sham_dev *dd,
> +static const struct of_device_id omap_sham_of_match[] = {
> + {},
> +};
> +
> +static int omap_sham_get_res_of(struct omap_sham_dev *dd,
> struct device *dev, struct resource *res)
> {
> return -EINVAL;
> --
> 1.7.12

I meant to add that this applies to the current cryptodev/master repo/branch.

Mark
--

2013-01-20 00:13:27

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: omap-sham - Fix compile errors when CONFIG_OF not defined

On Tue, Jan 15, 2013 at 01:53:02PM -0700, Mark A. Greer wrote:
> From: "Mark A. Greer" <[email protected]>
>
> Fix the compile errors created by commit 2545e8d
> (crypto: omap-sham - Add Device Tree Support)
> when CONFIG_OF is not defined. This includes
> changing omap_sham_get_res_dev() to omap_sham_get_res_of()
> and creating an empty version of omap_sham_of_match[].
>
> Signed-off-by: Mark A. Greer <[email protected]>

Also applied.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt