mfd: cros_ec: Check DT node for usbpd-notify add
authorPrashant Malani <pmalani@chromium.org>
Mon, 10 Feb 2020 19:06:24 +0000 (11:06 -0800)
committerLee Jones <lee.jones@linaro.org>
Mon, 30 Mar 2020 06:34:56 +0000 (07:34 +0100)
commitf8db89d14efb770dd59aa0ca74386e5de68310d5
tree471d3767b7204f18e460a1cfbab445f73467f108
parent873357b1a7f044888be0a1dc6a753376cd2140eb
mfd: cros_ec: Check DT node for usbpd-notify add

Add a check to ensure there is indeed an EC device tree entry before
adding the cros-usbpd-notify device. This covers configs where both
CONFIG_ACPI and CONFIG_OF are defined, but the EC device is defined
using device tree and not in ACPI.

Fixes: 4602dce0361e ("mfd: cros_ec: Add cros-usbpd-notify subdevice")
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/cros_ec_dev.c