greybus: kernel_ver.h: provide pwm_is_enabled()
commit44d6449350b866cbea613aabe5aba4aa640791cd
authorGreg Kroah-Hartman <gregkh@google.com>
Wed, 8 Jun 2016 04:33:54 +0000 (7 21:33 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 8 Jun 2016 16:29:02 +0000 (8 09:29 -0700)
tree3ca2cab77effe8bbbd58005bff4bcc025f785ff3
parent4d27574cd354bc47758268c2e32a0a47b7aacfc0
greybus: kernel_ver.h: provide pwm_is_enabled()

In the 4.7-rc1 kernel release, PWMF_ENABLED is removed and
pwm_is_enabled() is the correct way to test if a pwm device is enabled,
so provide a version of that function that will work on all older
kernels and change the pwm.c driver to use it so that it will work on
newer kernels as well.

Tested:
Tree now builds successfully against 3.14.y, 4.4.y, 4.5.y,
4.6.y, and 4.7-rc2 kernels

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/kernel_ver.h
drivers/staging/greybus/pwm.c