mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
drivers: uio: Only allocate new private data when probing device tree node
The same condition should be used both when allocating and freeing the driver private data. When dev.of_node is non NULL, allocate a new private data structure, otherwise use the values from the platform data. Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Damian Hobson-Garcia <[email protected]> Cc: "Hans J. Koch" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
439926c81c
commit
d5185c4eb3
2 changed files with 2 additions and 2 deletions
|
|
@ -153,7 +153,7 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev)
|
|||
int ret = -EINVAL;
|
||||
int i;
|
||||
|
||||
if (!uioinfo) {
|
||||
if (pdev->dev.of_node) {
|
||||
int irq;
|
||||
|
||||
/* alloc uioinfo for one device */
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)
|
|||
int ret = -EINVAL;
|
||||
int i;
|
||||
|
||||
if (!uioinfo) {
|
||||
if (pdev->dev.of_node) {
|
||||
int irq;
|
||||
|
||||
/* alloc uioinfo for one device */
|
||||
|
|
|
|||
Loading…
Reference in a new issue