diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-06-10 05:30:17 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-06-10 05:30:17 -0300 |
commit | d635711daa98be86d4c7fd01499c34f566b54ccb (patch) | |
tree | aa5cc3760a27c3d57146498cb82fa549547de06c /drivers/staging/gs_fpgaboot | |
parent | c91265cd0efb83778f015b4d4b1129bd2cfd075e (diff) |
Linux-libre 4.6.2-gnu
Diffstat (limited to 'drivers/staging/gs_fpgaboot')
-rw-r--r-- | drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c index a3a10f9a2..7b7c9786c 100644 --- a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c +++ b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c @@ -34,7 +34,7 @@ #define DEVICE_NAME "device" #define CLASS_NAME "fpgaboot" -static uint8_t bits_magic[] = { +static u8 bits_magic[] = { 0x0, 0x9, 0xf, 0xf0, 0xf, 0xf0, 0xf, 0xf0, 0xf, 0xf0, 0x0, 0x0, 0x1}; @@ -54,7 +54,7 @@ static void read_bitstream(char *bitdata, char *buf, int *offset, int rdsize) static void readinfo_bitstream(char *bitdata, char *buf, int *offset) { char tbuf[64]; - int32_t len; + s32 len; /* read section char */ read_bitstream(bitdata, tbuf, offset, 1); @@ -281,17 +281,12 @@ static int init_driver(void) return PTR_ERR_OR_ZERO(firmware_pdev); } -static void finish_driver(void) -{ - platform_device_unregister(firmware_pdev); -} - static int gs_fpgaboot(void) { int err; struct fpgaimage *fimage; - fimage = kmalloc(sizeof(struct fpgaimage), GFP_KERNEL); + fimage = kmalloc(sizeof(*fimage), GFP_KERNEL); if (!fimage) return -ENOMEM; @@ -370,14 +365,14 @@ static int __init gs_fpgaboot_init(void) return 0; errout: - finish_driver(); + platform_device_unregister(firmware_pdev); return err; } static void __exit gs_fpgaboot_exit(void) { - finish_driver(); + platform_device_unregister(firmware_pdev); pr_info("FPGA image download module removed\n"); } |