backports: fix rfkill sparse warning
authorJohannes Berg <johannes.berg@intel.com>
Thu, 16 May 2013 10:28:38 +0000 (12:28 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 16 May 2013 10:28:38 +0000 (12:28 +0200)
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 <johannes.berg@intel.com>
backport/backport-include/linux/rfkill.h

index d9422bced202f604882726810ff074408795e116..188a23b1ea0328c5ef77941570a9e7ca77e33e60 100644 (file)
@@ -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