#define SWAP_DEVICE_NAME "swap_device"
+#define MAXIMUM_SUBBUFFER_SIZE (64 * 1024)
+
/* swap_device driver routines */
static int swap_device_open(struct inode *inode, struct file *filp);
static int swap_device_release(struct inode *inode, struct file *file);
break;
}
+ if (initialize_struct.size > MAXIMUM_SUBBUFFER_SIZE) {
+ print_err("Wrong subbuffer size\n");
+ result = -E_SD_WRONG_ARGS;
+ break;
+ }
+
result = driver_to_buffer_initialize(initialize_struct.size,
initialize_struct.count);
if (result < 0) {