Re: [PATCH] hwrng: via-rng: Add MODULE_DEVICE_TABLE

2013-09-02 Thread Herbert Xu
On Sun, Sep 01, 2013 at 11:53:57PM +0100, Ben Hutchings wrote:
> via-rng currently isn't auto-loaded if built as a module.
> 
> Signed-off-by: Ben Hutchings 

Patch applied.  Thanks.
-- 
Email: Herbert Xu 
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] hwrng: via-rng: Add MODULE_DEVICE_TABLE

2013-09-02 Thread Herbert Xu
On Sun, Sep 01, 2013 at 11:53:57PM +0100, Ben Hutchings wrote:
 via-rng currently isn't auto-loaded if built as a module.
 
 Signed-off-by: Ben Hutchings b...@decadent.org.uk

Patch applied.  Thanks.
-- 
Email: Herbert Xu herb...@gondor.apana.org.au
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] hwrng: via-rng: Add MODULE_DEVICE_TABLE

2013-09-01 Thread Ben Hutchings
via-rng currently isn't auto-loaded if built as a module.

Signed-off-by: Ben Hutchings 
---
Compile-tested only.

Ben.

 drivers/char/hw_random/via-rng.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/char/hw_random/via-rng.c b/drivers/char/hw_random/via-rng.c
index d0387a8..e737772 100644
--- a/drivers/char/hw_random/via-rng.c
+++ b/drivers/char/hw_random/via-rng.c
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -220,5 +221,11 @@ static void __exit mod_exit(void)
 module_init(mod_init);
 module_exit(mod_exit);
 
+static struct x86_cpu_id via_rng_cpu_id[] = {
+   X86_FEATURE_MATCH(X86_FEATURE_XSTORE),
+   {}
+};
+
 MODULE_DESCRIPTION("H/W RNG driver for VIA CPU with PadLock");
 MODULE_LICENSE("GPL");
+MODULE_DEVICE_TABLE(x86cpu, via_rng_cpu_id);



signature.asc
Description: This is a digitally signed message part


[PATCH] hwrng: via-rng: Add MODULE_DEVICE_TABLE

2013-09-01 Thread Ben Hutchings
via-rng currently isn't auto-loaded if built as a module.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
Compile-tested only.

Ben.

 drivers/char/hw_random/via-rng.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/char/hw_random/via-rng.c b/drivers/char/hw_random/via-rng.c
index d0387a8..e737772 100644
--- a/drivers/char/hw_random/via-rng.c
+++ b/drivers/char/hw_random/via-rng.c
@@ -29,6 +29,7 @@
 #include linux/kernel.h
 #include linux/hw_random.h
 #include linux/delay.h
+#include asm/cpu_device_id.h
 #include asm/io.h
 #include asm/msr.h
 #include asm/cpufeature.h
@@ -220,5 +221,11 @@ static void __exit mod_exit(void)
 module_init(mod_init);
 module_exit(mod_exit);
 
+static struct x86_cpu_id via_rng_cpu_id[] = {
+   X86_FEATURE_MATCH(X86_FEATURE_XSTORE),
+   {}
+};
+
 MODULE_DESCRIPTION(H/W RNG driver for VIA CPU with PadLock);
 MODULE_LICENSE(GPL);
+MODULE_DEVICE_TABLE(x86cpu, via_rng_cpu_id);



signature.asc
Description: This is a digitally signed message part