From c73e015c95886cc77f2af55abe93247aa1dab3c8 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Thu, 16 May 2013 12:28:38 +0200 Subject: [PATCH] backports: fix rfkill sparse warning The new backport rfkill approach caused a sparse warning: linux/rfkill.h:70:43: warning: mixing different enum types linux/rfkill.h:70:43: int enum rfkill_type versus linux/rfkill.h:70:43: int enum old_rfkill_type Fix it by adding a cast. Signed-off-by: Johannes Berg --- backport/backport-include/linux/rfkill.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backport/backport-include/linux/rfkill.h b/backport/backport-include/linux/rfkill.h index d9422bced202..188a23b1ea03 100644 --- a/backport/backport-include/linux/rfkill.h +++ b/backport/backport-include/linux/rfkill.h @@ -67,7 +67,8 @@ backport_rfkill_alloc(const char *name, #ifdef HAVE_OLD_RFKILL if ((unsigned int)type >= (unsigned int)OLD_NUM_RFKILL_TYPES) return ERR_PTR(-ENODEV); - return rfkill_alloc(name, parent, type, ops, ops_data); + return rfkill_alloc(name, parent, (enum old_rfkill_type)type, + ops, ops_data); #else return ERR_PTR(-ENODEV); #endif -- 2.30.2