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>
#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