brcm63xx: fix an OOPS when accessing the basemode register on 6368
authorJonas Gorski <jonas.gorski@gmail.com>
Wed, 13 Dec 2017 15:36:20 +0000 (16:36 +0100)
committerJonas Gorski <jonas.gorski@gmail.com>
Wed, 13 Dec 2017 15:40:47 +0000 (16:40 +0100)
The bcm6368 pinctrl driver passed the wrong variable to
devm_regmap_field_alloc, causing it to blow up when later trying to
access the field.

Fixes #1211.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
target/linux/brcm63xx/patches-4.4/140-pinctrl-add-a-pincontrol-driver-for-BCM6368.patch

index 9d086a65f2db56d4d5d051d44f7f3d00136273aa..6a9b9e080706ad7e74cc3dd47ca375d9bc4afe32 100644 (file)
@@ -575,7 +575,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
 +      if (!pctl)
 +              return -ENOMEM;
 +
-+      pctl->overlay = devm_regmap_field_alloc(&pdev->dev, mode, overlay);
++      pctl->overlay = devm_regmap_field_alloc(&pdev->dev, basemode, overlay);
 +      if (IS_ERR(pctl->overlay))
 +              return PTR_ERR(pctl->overlay);
 +