From: Johannes Berg Date: Thu, 16 May 2013 10:28:38 +0000 (+0200) Subject: backports: fix rfkill sparse warning X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c73e015c95886cc77f2af55abe93247aa1dab3c8;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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