m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--surface.c17
2 files changed, 5 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index d269ea1..f432ef0 100644
--- a/Makefile
+++ b/Makefile
@@ -7,4 +7,4 @@ clean:
$(MAKE) -C $(KDIR) M=$$PWD clean
tags: pci.c pci.h char.c char.h harddoom_main.c
- ctags -R linux .
+ ctags -R .
diff --git a/surface.c b/surface.c
index 82d9756..68101fa 100644
--- a/surface.c
+++ b/surface.c
@@ -114,16 +114,13 @@ void free_texture(struct texture_data *texture_data)
texture_data->texture_dev);
}
-int new_texture(struct file *filp, struct doomdev_ioctl_create_texture *arg)
+int new_texture(struct file *filp, struct doomdev_ioctl_create_texture *params)
{
int err;
- struct doomdev_ioctl_create_texture *params;
struct texture_data *texture_data;
int fd;
struct doom_data *doom_data;
- params = (struct doomdev_ioctl_create_texture *) arg;
-
err = verify_texture_params(params);
if (err < 0) {
return err;
@@ -205,16 +202,13 @@ void free_flat(struct flat_data *flat_data)
flat_data->flat_cpu, flat_data->flat_dev);
}
-int new_flat(struct file *filp, struct doomdev_ioctl_create_flat *arg)
+int new_flat(struct file *filp, struct doomdev_ioctl_create_flat *params)
{
int err;
- struct doomdev_ioctl_create_flat *params;
struct flat_data *flat_data;
int fd;
struct doom_data *doom_data;
- params = (struct doomdev_ioctl_create_flat *) arg;
-
flat_data = kmalloc(sizeof(*flat_data), GFP_KERNEL);
ORFAIL_NULL(flat_data, -ENOMEM, error_data);
doom_data = container_of(filp->f_inode->i_cdev, struct doom_data, cdev);
@@ -297,16 +291,13 @@ void free_colors(struct colors_data *colors_data)
colors_data->colors_cpu, colors_data->colors_dev);
}
-int new_colors(struct file *filp, struct doomdev_ioctl_create_colormaps *arg)
+int new_colors(struct file *filp, struct doomdev_ioctl_create_colormaps *params)
{
int err;
- struct doomdev_ioctl_create_colormaps *params;
struct colors_data *colors_data;
int fd;
struct doom_data *doom_data;
- params = (struct doomdev_ioctl_create_colormaps *) arg;
-
colors_data = kmalloc(sizeof(*colors_data), GFP_KERNEL);
ORFAIL_NULL(colors_data, -ENOMEM, error_data);
doom_data = container_of(filp->f_inode->i_cdev, struct doom_data, cdev);
@@ -828,7 +819,7 @@ int alloc_surface_buffer(struct doomdev_ioctl_create_surface *params,
}
if (pages_needed > 1024) {
- return -ENOMEM;
+ return -EOVERFLOW;
}
surface_data->pages = pages_needed;