mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 15:13:55 +08:00
serial: bfin_uart: Remove casting the return value which is a void pointer
Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5c02fab62e
commit
0e03e3f8ea
@ -1240,7 +1240,7 @@ static int bfin_serial_probe(struct platform_device *pdev)
|
|||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
ret = peripheral_request_list(
|
ret = peripheral_request_list(
|
||||||
(unsigned short *)dev_get_platdata(&pdev->dev),
|
dev_get_platdata(&pdev->dev),
|
||||||
DRIVER_NAME);
|
DRIVER_NAME);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
@ -1358,8 +1358,7 @@ static int bfin_serial_probe(struct platform_device *pdev)
|
|||||||
out_error_unmap:
|
out_error_unmap:
|
||||||
iounmap(uart->port.membase);
|
iounmap(uart->port.membase);
|
||||||
out_error_free_peripherals:
|
out_error_free_peripherals:
|
||||||
peripheral_free_list(
|
peripheral_free_list(dev_get_platdata(&pdev->dev));
|
||||||
(unsigned short *)dev_get_platdata(&pdev->dev));
|
|
||||||
out_error_free_mem:
|
out_error_free_mem:
|
||||||
kfree(uart);
|
kfree(uart);
|
||||||
bfin_serial_ports[pdev->id] = NULL;
|
bfin_serial_ports[pdev->id] = NULL;
|
||||||
@ -1377,8 +1376,7 @@ static int bfin_serial_remove(struct platform_device *pdev)
|
|||||||
if (uart) {
|
if (uart) {
|
||||||
uart_remove_one_port(&bfin_serial_reg, &uart->port);
|
uart_remove_one_port(&bfin_serial_reg, &uart->port);
|
||||||
iounmap(uart->port.membase);
|
iounmap(uart->port.membase);
|
||||||
peripheral_free_list(
|
peripheral_free_list(dev_get_platdata(&pdev->dev));
|
||||||
(unsigned short *)dev_get_platdata(&pdev->dev));
|
|
||||||
kfree(uart);
|
kfree(uart);
|
||||||
bfin_serial_ports[pdev->id] = NULL;
|
bfin_serial_ports[pdev->id] = NULL;
|
||||||
}
|
}
|
||||||
@ -1432,8 +1430,8 @@ static int bfin_earlyprintk_probe(struct platform_device *pdev)
|
|||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = peripheral_request_list(
|
ret = peripheral_request_list(dev_get_platdata(&pdev->dev),
|
||||||
(unsigned short *)dev_get_platdata(&pdev->dev), DRIVER_NAME);
|
DRIVER_NAME);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"fail to request bfin serial peripherals\n");
|
"fail to request bfin serial peripherals\n");
|
||||||
@ -1463,8 +1461,7 @@ static int bfin_earlyprintk_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_error_free_peripherals:
|
out_error_free_peripherals:
|
||||||
peripheral_free_list(
|
peripheral_free_list(dev_get_platdata(&pdev->dev));
|
||||||
(unsigned short *)dev_get_platdata(&pdev->dev));
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user