edac, mc: Improve scrub rate handling
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / edac / e752x_edac.c
index ae3f80c54198a29918f3809b1299918a330277ac..073f5a06d23857b5f09ae0d3c177920cdf13ddba 100644 (file)
@@ -958,7 +958,7 @@ static void e752x_check(struct mem_ctl_info *mci)
 }
 
 /* Program byte/sec bandwidth scrub rate to hardware */
-static int set_sdram_scrub_rate(struct mem_ctl_info *mci, u32 *new_bw)
+static int set_sdram_scrub_rate(struct mem_ctl_info *mci, u32 new_bw)
 {
        const struct scrubrate *scrubrates;
        struct e752x_pvt *pvt = (struct e752x_pvt *) mci->pvt_info;
@@ -975,7 +975,7 @@ static int set_sdram_scrub_rate(struct mem_ctl_info *mci, u32 *new_bw)
         * desired rate and program the cooresponding register value.
         */
        for (i = 0; scrubrates[i].bandwidth != SDRATE_EOT; i++)
-               if (scrubrates[i].bandwidth >= *new_bw)
+               if (scrubrates[i].bandwidth >= new_bw)
                        break;
 
        if (scrubrates[i].bandwidth == SDRATE_EOT)