31 lines
597 B
C
31 lines
597 B
C
#ifndef _KSUDOKU_H_
|
|
#define _KSUDOKU_H_
|
|
#include <linux/init.h>
|
|
#include <linux/module.h>
|
|
#include <linux/sysfs.h>
|
|
|
|
ssize_t is_valid_show(void);
|
|
ssize_t is_valid_store(void);
|
|
|
|
ssize_t is_solved_show(void);
|
|
ssize_t is_solved_store(void);
|
|
|
|
struct matrix_attribute {
|
|
struct attribute attr;
|
|
ssize_t (*show)(void);
|
|
ssize_t (*store)(void);
|
|
bool value;
|
|
};
|
|
|
|
struct matrix {
|
|
char matrix[81];
|
|
};
|
|
|
|
#define MATRIX_ATTR_RO(_name) \
|
|
struct matrix_attribute matrix_##_name = __ATTR_RO(_name)
|
|
|
|
#define MATRIX_ATTR_WO(_name) \
|
|
struct matrix_attribute matrix_##_name = __ATTR_WO(_name)
|
|
|
|
#endif
|