diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 18:59:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 18:59:10 -0400 |
commit | 0bd3fbd4abeafa19ae0302d25194468b022d1a56 (patch) | |
tree | 1fc34b25666c97b85dfb7199e48b2e074ffde264 /drivers/char | |
parent | 0b87da68a0f0a7bf7f7446cf64f92e672bd68ef8 (diff) | |
parent | ef45b834319f8a18f257a40ba4bce6b829ef1708 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu:
- New cipher/hash driver for ARM ux500.
- Code clean-up for aesni-intel.
- Misc fixes.
Fixed up conflicts in arch/arm/mach-ux500/devices-common.h, where quite
frankly some of it made no sense at all (the pull brought in a
declaration for the dbx500_add_platform_device_noirq() function, which
neither exists nor is used anywhere).
Also some trivial add-add context conflicts in the Kconfig file in
drivers/{char/hw_random,crypto}/
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: aesni-intel - move more common code to ablk_init_common
crypto: aesni-intel - use crypto_[un]register_algs
crypto: ux500 - Cleanup hardware identification
crypto: ux500 - Update DMA handling for 3.4
mach-ux500: crypto - core support for CRYP/HASH module.
crypto: ux500 - Add driver for HASH hardware
crypto: ux500 - Add driver for CRYP hardware
hwrng: Kconfig - modify default state for atmel-rng driver
hwrng: omap - use devm_request_and_ioremap
crypto: crypto4xx - move up err_request_irq label
crypto, xor: Sanitize checksumming function selection output
crypto: caam - add backward compatible string sec4.0
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hw_random/Kconfig | 2 | ||||
-rw-r--r-- | drivers/char/hw_random/omap-rng.c | 22 |
2 files changed, 3 insertions, 21 deletions
diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index c225314468ee..f45dad39a18b 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig | |||
@@ -63,7 +63,7 @@ config HW_RANDOM_AMD | |||
63 | config HW_RANDOM_ATMEL | 63 | config HW_RANDOM_ATMEL |
64 | tristate "Atmel Random Number Generator support" | 64 | tristate "Atmel Random Number Generator support" |
65 | depends on HW_RANDOM && HAVE_CLK | 65 | depends on HW_RANDOM && HAVE_CLK |
66 | default HW_RANDOM | 66 | default (HW_RANDOM && ARCH_AT91) |
67 | ---help--- | 67 | ---help--- |
68 | This driver provides kernel-side support for the Random Number | 68 | This driver provides kernel-side support for the Random Number |
69 | Generator hardware found on Atmel AT91 devices. | 69 | Generator hardware found on Atmel AT91 devices. |
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index a07a5caa599c..1412565c01af 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c | |||
@@ -115,22 +115,12 @@ static int __devinit omap_rng_probe(struct platform_device *pdev) | |||
115 | 115 | ||
116 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 116 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
117 | 117 | ||
118 | if (!res) { | 118 | rng_base = devm_request_and_ioremap(&pdev->dev, res); |
119 | ret = -ENOENT; | ||
120 | goto err_region; | ||
121 | } | ||
122 | |||
123 | if (!request_mem_region(res->start, resource_size(res), pdev->name)) { | ||
124 | ret = -EBUSY; | ||
125 | goto err_region; | ||
126 | } | ||
127 | |||
128 | dev_set_drvdata(&pdev->dev, res); | ||
129 | rng_base = ioremap(res->start, resource_size(res)); | ||
130 | if (!rng_base) { | 119 | if (!rng_base) { |
131 | ret = -ENOMEM; | 120 | ret = -ENOMEM; |
132 | goto err_ioremap; | 121 | goto err_ioremap; |
133 | } | 122 | } |
123 | dev_set_drvdata(&pdev->dev, res); | ||
134 | 124 | ||
135 | ret = hwrng_register(&omap_rng_ops); | 125 | ret = hwrng_register(&omap_rng_ops); |
136 | if (ret) | 126 | if (ret) |
@@ -145,11 +135,8 @@ static int __devinit omap_rng_probe(struct platform_device *pdev) | |||
145 | return 0; | 135 | return 0; |
146 | 136 | ||
147 | err_register: | 137 | err_register: |
148 | iounmap(rng_base); | ||
149 | rng_base = NULL; | 138 | rng_base = NULL; |
150 | err_ioremap: | 139 | err_ioremap: |
151 | release_mem_region(res->start, resource_size(res)); | ||
152 | err_region: | ||
153 | if (cpu_is_omap24xx()) { | 140 | if (cpu_is_omap24xx()) { |
154 | clk_disable(rng_ick); | 141 | clk_disable(rng_ick); |
155 | clk_put(rng_ick); | 142 | clk_put(rng_ick); |
@@ -159,20 +146,15 @@ err_region: | |||
159 | 146 | ||
160 | static int __exit omap_rng_remove(struct platform_device *pdev) | 147 | static int __exit omap_rng_remove(struct platform_device *pdev) |
161 | { | 148 | { |
162 | struct resource *res = dev_get_drvdata(&pdev->dev); | ||
163 | |||
164 | hwrng_unregister(&omap_rng_ops); | 149 | hwrng_unregister(&omap_rng_ops); |
165 | 150 | ||
166 | omap_rng_write_reg(RNG_MASK_REG, 0x0); | 151 | omap_rng_write_reg(RNG_MASK_REG, 0x0); |
167 | 152 | ||
168 | iounmap(rng_base); | ||
169 | |||
170 | if (cpu_is_omap24xx()) { | 153 | if (cpu_is_omap24xx()) { |
171 | clk_disable(rng_ick); | 154 | clk_disable(rng_ick); |
172 | clk_put(rng_ick); | 155 | clk_put(rng_ick); |
173 | } | 156 | } |
174 | 157 | ||
175 | release_mem_region(res->start, resource_size(res)); | ||
176 | rng_base = NULL; | 158 | rng_base = NULL; |
177 | 159 | ||
178 | return 0; | 160 | return 0; |