include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / scsi / aic94xx / aic94xx_sds.c
index 2a4c933eb89c060a906da809908dd7fb929747e1..edb43fda9f36f34d5834f3f516fc9227aea67af6 100644 (file)
@@ -26,6 +26,7 @@
  */
 
 #include <linux/pci.h>
+#include <linux/slab.h>
 #include <linux/delay.h>
 
 #include "aic94xx.h"
@@ -590,8 +591,8 @@ static int asd_reset_flash(struct asd_ha_struct *asd_ha)
        return err;
 }
 
-static inline int asd_read_flash_seg(struct asd_ha_struct *asd_ha,
-                                    void *buffer, u32 offs, int size)
+static int asd_read_flash_seg(struct asd_ha_struct *asd_ha,
+                             void *buffer, u32 offs, int size)
 {
        asd_read_reg_string(asd_ha, buffer, asd_ha->hw_prof.flash.bar+offs,
                            size);
@@ -1093,9 +1094,9 @@ out:
  * @bytes_to_verify: total bytes to verify
  */
 int asd_verify_flash_seg(struct asd_ha_struct *asd_ha,
-               void *src, u32 dest_offset, u32 bytes_to_verify)
+                        const void *src, u32 dest_offset, u32 bytes_to_verify)
 {
-       u8 *src_buf;
+       const u8 *src_buf;
        u8 flash_char;
        int err;
        u32 nv_offset, reg, i;
@@ -1105,7 +1106,7 @@ int asd_verify_flash_seg(struct asd_ha_struct *asd_ha,
 
        err = FLASH_OK;
        nv_offset = dest_offset;
-       src_buf = (u8 *)src;
+       src_buf = (const u8 *)src;
        for (i = 0; i < bytes_to_verify; i++) {
                flash_char = asd_read_reg_byte(asd_ha, reg + nv_offset + i);
                if (flash_char != src_buf[i]) {
@@ -1124,9 +1125,9 @@ int asd_verify_flash_seg(struct asd_ha_struct *asd_ha,
  * @bytes_to_write: total bytes to write
  */
 int asd_write_flash_seg(struct asd_ha_struct *asd_ha,
-               void *src, u32 dest_offset, u32 bytes_to_write)
+                       const void *src, u32 dest_offset, u32 bytes_to_write)
 {
-       u8 *src_buf;
+       const u8 *src_buf;
        u32 nv_offset, reg, i;
        int err;
 
@@ -1153,7 +1154,7 @@ int asd_write_flash_seg(struct asd_ha_struct *asd_ha,
                return err;
        }
 
-       src_buf = (u8 *)src;
+       src_buf = (const u8 *)src;
        for (i = 0; i < bytes_to_write; i++) {
                /* Setup program command sequence */
                switch (asd_ha->hw_prof.flash.method) {