diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-21 12:42:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-21 12:42:58 -0400 |
commit | 1fc149933fd49a5b0e7738dc0853dbfbac4ae0e1 (patch) | |
tree | dfe99751c21aaf39e49765379d0b9b32114c757d /drivers/char/hw_random | |
parent | 41d5e08ea86af3359239d5a6f7021cdc61beaa49 (diff) | |
parent | ea5505fabd3b59608750bfd3721d0f8bc5c8b0bb (diff) |
Merge tag 'char-misc-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here's the big char/misc driver patchset for 4.1-rc1.
Lots of different driver subsystem updates here, nothing major, full
details are in the shortlog.
All of this has been in linux-next for a while"
* tag 'char-misc-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (133 commits)
mei: trace: remove unused TRACE_SYSTEM_STRING
DTS: ARM: OMAP3-N900: Add lis3lv02d support
Documentation: DT: lis302: update wakeup binding
lis3lv02d: DT: add wakeup unit 2 and wakeup threshold
lis3lv02d: DT: use s32 to support negative values
Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX case
Drivers: hv: hv_balloon: correctly handle val.freeram<num_pages case
mei: replace check for connection instead of transitioning
mei: use mei_cl_is_connected consistently
mei: fix mei_poll operation
hv_vmbus: Add gradually increased delay for retries in vmbus_post_msg()
Drivers: hv: hv_balloon: survive ballooning request with num_pages=0
Drivers: hv: hv_balloon: eliminate jumps in piecewiese linear floor function
Drivers: hv: hv_balloon: do not online pages in offline blocks
hv: remove the per-channel workqueue
hv: don't schedule new works in vmbus_onoffer()/vmbus_onoffer_rescind()
hv: run non-blocking message handlers in the dispatch tasklet
coresight: moving to new "hwtracing" directory
coresight-tmc: Adding a status interface to sysfs
coresight: remove the unnecessary configuration coresight-default-sink
...
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/core.c | 34 | ||||
-rw-r--r-- | drivers/char/hw_random/pasemi-rng.c | 2 | ||||
-rw-r--r-- | drivers/char/hw_random/powernv-rng.c | 2 | ||||
-rw-r--r-- | drivers/char/hw_random/ppc4xx-rng.c | 2 |
4 files changed, 14 insertions, 26 deletions
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index 571ef61f8ea9..da8faf78536a 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c | |||
@@ -300,11 +300,14 @@ static const struct file_operations rng_chrdev_ops = { | |||
300 | .llseek = noop_llseek, | 300 | .llseek = noop_llseek, |
301 | }; | 301 | }; |
302 | 302 | ||
303 | static const struct attribute_group *rng_dev_groups[]; | ||
304 | |||
303 | static struct miscdevice rng_miscdev = { | 305 | static struct miscdevice rng_miscdev = { |
304 | .minor = RNG_MISCDEV_MINOR, | 306 | .minor = RNG_MISCDEV_MINOR, |
305 | .name = RNG_MODULE_NAME, | 307 | .name = RNG_MODULE_NAME, |
306 | .nodename = "hwrng", | 308 | .nodename = "hwrng", |
307 | .fops = &rng_chrdev_ops, | 309 | .fops = &rng_chrdev_ops, |
310 | .groups = rng_dev_groups, | ||
308 | }; | 311 | }; |
309 | 312 | ||
310 | 313 | ||
@@ -377,37 +380,22 @@ static DEVICE_ATTR(rng_available, S_IRUGO, | |||
377 | hwrng_attr_available_show, | 380 | hwrng_attr_available_show, |
378 | NULL); | 381 | NULL); |
379 | 382 | ||
383 | static struct attribute *rng_dev_attrs[] = { | ||
384 | &dev_attr_rng_current.attr, | ||
385 | &dev_attr_rng_available.attr, | ||
386 | NULL | ||
387 | }; | ||
388 | |||
389 | ATTRIBUTE_GROUPS(rng_dev); | ||
380 | 390 | ||
381 | static void __exit unregister_miscdev(void) | 391 | static void __exit unregister_miscdev(void) |
382 | { | 392 | { |
383 | device_remove_file(rng_miscdev.this_device, &dev_attr_rng_available); | ||
384 | device_remove_file(rng_miscdev.this_device, &dev_attr_rng_current); | ||
385 | misc_deregister(&rng_miscdev); | 393 | misc_deregister(&rng_miscdev); |
386 | } | 394 | } |
387 | 395 | ||
388 | static int __init register_miscdev(void) | 396 | static int __init register_miscdev(void) |
389 | { | 397 | { |
390 | int err; | 398 | return misc_register(&rng_miscdev); |
391 | |||
392 | err = misc_register(&rng_miscdev); | ||
393 | if (err) | ||
394 | goto out; | ||
395 | err = device_create_file(rng_miscdev.this_device, | ||
396 | &dev_attr_rng_current); | ||
397 | if (err) | ||
398 | goto err_misc_dereg; | ||
399 | err = device_create_file(rng_miscdev.this_device, | ||
400 | &dev_attr_rng_available); | ||
401 | if (err) | ||
402 | goto err_remove_current; | ||
403 | out: | ||
404 | return err; | ||
405 | |||
406 | err_remove_current: | ||
407 | device_remove_file(rng_miscdev.this_device, &dev_attr_rng_current); | ||
408 | err_misc_dereg: | ||
409 | misc_deregister(&rng_miscdev); | ||
410 | goto out; | ||
411 | } | 399 | } |
412 | 400 | ||
413 | static int hwrng_fillfn(void *unused) | 401 | static int hwrng_fillfn(void *unused) |
diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c index 3eb7bdd7f93b..51cb1d5cc489 100644 --- a/drivers/char/hw_random/pasemi-rng.c +++ b/drivers/char/hw_random/pasemi-rng.c | |||
@@ -133,7 +133,7 @@ static int rng_remove(struct platform_device *dev) | |||
133 | return 0; | 133 | return 0; |
134 | } | 134 | } |
135 | 135 | ||
136 | static struct of_device_id rng_match[] = { | 136 | static const struct of_device_id rng_match[] = { |
137 | { .compatible = "1682m-rng", }, | 137 | { .compatible = "1682m-rng", }, |
138 | { .compatible = "pasemi,pwrficient-rng", }, | 138 | { .compatible = "pasemi,pwrficient-rng", }, |
139 | { }, | 139 | { }, |
diff --git a/drivers/char/hw_random/powernv-rng.c b/drivers/char/hw_random/powernv-rng.c index 3f4f63204560..263a5bb8e605 100644 --- a/drivers/char/hw_random/powernv-rng.c +++ b/drivers/char/hw_random/powernv-rng.c | |||
@@ -61,7 +61,7 @@ static int powernv_rng_probe(struct platform_device *pdev) | |||
61 | return 0; | 61 | return 0; |
62 | } | 62 | } |
63 | 63 | ||
64 | static struct of_device_id powernv_rng_match[] = { | 64 | static const struct of_device_id powernv_rng_match[] = { |
65 | { .compatible = "ibm,power-rng",}, | 65 | { .compatible = "ibm,power-rng",}, |
66 | {}, | 66 | {}, |
67 | }; | 67 | }; |
diff --git a/drivers/char/hw_random/ppc4xx-rng.c b/drivers/char/hw_random/ppc4xx-rng.c index c85d31a5f9e3..b2cfda0fa93e 100644 --- a/drivers/char/hw_random/ppc4xx-rng.c +++ b/drivers/char/hw_random/ppc4xx-rng.c | |||
@@ -123,7 +123,7 @@ static int ppc4xx_rng_remove(struct platform_device *dev) | |||
123 | return 0; | 123 | return 0; |
124 | } | 124 | } |
125 | 125 | ||
126 | static struct of_device_id ppc4xx_rng_match[] = { | 126 | static const struct of_device_id ppc4xx_rng_match[] = { |
127 | { .compatible = "ppc4xx-rng", }, | 127 | { .compatible = "ppc4xx-rng", }, |
128 | { .compatible = "amcc,ppc460ex-rng", }, | 128 | { .compatible = "amcc,ppc460ex-rng", }, |
129 | { .compatible = "amcc,ppc440epx-rng", }, | 129 | { .compatible = "amcc,ppc440epx-rng", }, |