BIT() macro is not defined in UAPI headers; there is, however, similarly defined _BITUL() macro present in include/uapi/linux/const.h; use it instead and include <linux/const.h> and <linux/ioctl.h> in order to make the definitions provided in the header useful.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -12,6 +12,9 @@ · 11 unmodified lines | |||
| 12 | #ifndef _UAPI_LINUX_RTC_H_ | 12 | #ifndef _UAPI_LINUX_RTC_H_ |
| 13 | #define _UAPI_LINUX_RTC_H_ | 13 | #define _UAPI_LINUX_RTC_H_ |
| 14 | 14 | ||
| 15 | #include <linux/const.h> | ||
| 16 | #include <linux/ioctl.h> | ||
| 17 | |||
| 15 | /* | 18 | /* |
| 16 | * The struct used to pass data via the following ioctl. Similar to the | 19 | * The struct used to pass data via the following ioctl. Similar to the |
| 17 | * struct tm in <time.h>, but it needs to be here so that the kernel | 20 | * struct tm in <time.h>, but it needs to be here so that the kernel |
| @@ -92,10 +95,10 @@ struct rtc_pll_info { · 74 unmodified lines | |||
| 92 | #define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ | 95 | #define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ |
| 93 | #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ | 96 | #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ |
| 94 | 97 | ||
| 95 | #define RTC_VL_DATA_INVALID BIT(0) /* Voltage too low, RTC data is invalid */ | 98 | #define RTC_VL_DATA_INVALID _BITUL(0) /* Voltage too low, RTC data is invalid */ |
| 96 | #define RTC_VL_BACKUP_LOW BIT(1) /* Backup voltage is low */ | 99 | #define RTC_VL_BACKUP_LOW _BITUL(1) /* Backup voltage is low */ |
| 97 | #define RTC_VL_BACKUP_EMPTY BIT(2) /* Backup empty or not present */ | 100 | #define RTC_VL_BACKUP_EMPTY _BITUL(2) /* Backup empty or not present */ |
| 98 | #define RTC_VL_ACCURACY_LOW BIT(3) /* Voltage is low, RTC accuracy is reduced */ | 101 | #define RTC_VL_ACCURACY_LOW _BITUL(3) /* Voltage is low, RTC accuracy is reduced */ |
| 99 | 102 | ||
| 100 | #define RTC_VL_READ _IOR('p', 0x13, unsigned int) /* Voltage low detection */ | 103 | #define RTC_VL_READ _IOR('p', 0x13, unsigned int) /* Voltage low detection */ |
| 101 | #define RTC_VL_CLR _IO('p', 0x14) /* Clear voltage low information */ | 104 | #define RTC_VL_CLR _IO('p', 0x14) /* Clear voltage low information */ |