提交 608c783a 编写于 作者: R Richard Purdie 提交者: Russell King

[ARM] 3479/1: Corgi SSP: Fix potential concurrent access problem

Patch from Richard Purdie

corgi_ssp_probe() should not access GPDR directly but should use
pxa_gpio_mode() which has appropriate locking and other safeguards.
Signed-off-by: NRichard Purdie <rpurdie@rpsys.net>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 7ea3bbbc
...@@ -196,12 +196,9 @@ static int __init corgi_ssp_probe(struct platform_device *dev) ...@@ -196,12 +196,9 @@ static int __init corgi_ssp_probe(struct platform_device *dev)
int ret; int ret;
/* Chip Select - Disable All */ /* Chip Select - Disable All */
GPDR(ssp_machinfo->cs_lcdcon) |= GPIO_bit(ssp_machinfo->cs_lcdcon); /* output */ pxa_gpio_mode(ssp_machinfo->cs_lcdcon | GPIO_OUT | GPIO_DFLT_HIGH);
GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */ pxa_gpio_mode(ssp_machinfo->cs_max1111 | GPIO_OUT | GPIO_DFLT_HIGH);
GPDR(ssp_machinfo->cs_max1111) |= GPIO_bit(ssp_machinfo->cs_max1111); /* output */ pxa_gpio_mode(ssp_machinfo->cs_ads7846 | GPIO_OUT | GPIO_DFLT_HIGH);
GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/
GPDR(ssp_machinfo->cs_ads7846) |= GPIO_bit(ssp_machinfo->cs_ads7846); /* output */
GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); /* High - Disable ADS7846*/
ret = ssp_init(&corgi_ssp_dev, ssp_machinfo->port, 0); ret = ssp_init(&corgi_ssp_dev, ssp_machinfo->port, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册