Fix wrong macro call breaking compilation and add header guard

This commit is contained in:
Werner Sembach 2021-02-22 20:12:58 +01:00
parent 5b99255be8
commit 226a40b8fb
2 changed files with 7 additions and 2 deletions

View file

@ -16,6 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this software. If not, see <https://www.gnu.org/licenses/>. * along with this software. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef TONGFANG_WMI_H
#define TONGFANG_WMI_H
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/wmi.h> #include <linux/wmi.h>
#include <linux/mutex.h> #include <linux/mutex.h>
@ -327,7 +330,7 @@ static u32 uw_set_fan(u32 fan_index, u8 fan_speed)
return 0; return 0;
} }
static u32 uw_set_fan_auto() static u32 uw_set_fan_auto(void)
{ {
u8 reg_high = 0x18; u8 reg_high = 0x18;
u32 i; u32 i;
@ -351,3 +354,5 @@ static u32 uw_set_fan_auto()
return 0; return 0;
} }
#endif

View file

@ -83,6 +83,6 @@
#define W_UW_FANSPEED2 _IOW(MAGIC_WRITE_UW, 0x11, int32_t*) #define W_UW_FANSPEED2 _IOW(MAGIC_WRITE_UW, 0x11, int32_t*)
#define W_UW_MODE _IOW(MAGIC_WRITE_UW, 0x12, int32_t*) #define W_UW_MODE _IOW(MAGIC_WRITE_UW, 0x12, int32_t*)
#define W_UW_MODE_ENABLE _IOW(MAGIC_WRITE_UW, 0x13, int32_t*) #define W_UW_MODE_ENABLE _IOW(MAGIC_WRITE_UW, 0x13, int32_t*)
#define W_UW_FANAUTO _IOW(MAGIC_WRITE_UW, 0x14) // undo all previous calls of W_UW_FANSPEED and W_UW_FANSPEED2 #define W_UW_FANAUTO _IO(MAGIC_WRITE_UW, 0x14) // undo all previous calls of W_UW_FANSPEED and W_UW_FANSPEED2
#endif #endif