Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3fbe484 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

greybus: kernel_ver: backport reinit_completion to pre-3.13



Backport upstream reinit_completion() to pre-3.13 kernels.

Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 800d6c8f
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -313,4 +313,19 @@ static inline bool led_sysfs_is_disabled(struct led_classdev *led_cdev)
#define SPI_NOR_MODALIAS "m25p80"
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
/**
 * reinit_completion - reinitialize a completion structure
 * @x:  pointer to completion structure that is to be reinitialized
 *
 * This inline function should be used to reinitialize a completion structure
 * so it can be reused. This is especially important after complete_all() is
 * used.
 */
static inline void reinit_completion(struct completion *x)
{
	x->done = 0;
}
#endif

#endif	/* __GREYBUS_KERNEL_VER_H */