Skip to content

Commit 44f4599

Browse files
Amir Mahdi Ghorbanianmiquelraynal
authored andcommitted
mtd: onenand: omap2: Fix errors in style
Correct mispelling, spacing, and coding style flaws caught by checkpatch.pl script in the Omap2 Onenand driver . Signed-off-by: Amir Mahdi Ghorbanian <[email protected]> Signed-off-by: Miquel Raynal <[email protected]>
1 parent 4aa906f commit 44f4599

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

drivers/mtd/nand/onenand/omap2.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
148148
unsigned long timeout;
149149
u32 syscfg;
150150

151-
if (state == FL_RESETING || state == FL_PREPARING_ERASE ||
151+
if (state == FL_RESETTING || state == FL_PREPARING_ERASE ||
152152
state == FL_VERIFYING_ERASE) {
153153
int i = 21;
154154
unsigned int intr_flags = ONENAND_INT_MASTER;
155155

156156
switch (state) {
157-
case FL_RESETING:
157+
case FL_RESETTING:
158158
intr_flags |= ONENAND_INT_RESET;
159159
break;
160160
case FL_PREPARING_ERASE:
@@ -375,7 +375,7 @@ static int omap2_onenand_read_bufferram(struct mtd_info *mtd, int area,
375375
* context fallback to PIO mode.
376376
*/
377377
if (!virt_addr_valid(buf) || bram_offset & 3 || (size_t)buf & 3 ||
378-
count < 384 || in_interrupt() || oops_in_progress )
378+
count < 384 || in_interrupt() || oops_in_progress)
379379
goto out_copy;
380380

381381
xtra = count & 3;
@@ -422,7 +422,7 @@ static int omap2_onenand_write_bufferram(struct mtd_info *mtd, int area,
422422
* context fallback to PIO mode.
423423
*/
424424
if (!virt_addr_valid(buf) || bram_offset & 3 || (size_t)buf & 3 ||
425-
count < 384 || in_interrupt() || oops_in_progress )
425+
count < 384 || in_interrupt() || oops_in_progress)
426426
goto out_copy;
427427

428428
dma_src = dma_map_single(dev, buf, count, DMA_TO_DEVICE);
@@ -528,7 +528,8 @@ static int omap2_onenand_probe(struct platform_device *pdev)
528528
c->gpmc_cs, c->phys_base, c->onenand.base,
529529
c->dma_chan ? "DMA" : "PIO");
530530

531-
if ((r = onenand_scan(&c->mtd, 1)) < 0)
531+
r = onenand_scan(&c->mtd, 1);
532+
if (r < 0)
532533
goto err_release_dma;
533534

534535
freq = omap2_onenand_get_freq(c->onenand.version_id);

drivers/mtd/nand/onenand/onenand_base.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2853,7 +2853,7 @@ static int onenand_otp_write_oob_nolock(struct mtd_info *mtd, loff_t to,
28532853

28542854
/* Exit OTP access mode */
28552855
this->command(mtd, ONENAND_CMD_RESET, 0, 0);
2856-
this->wait(mtd, FL_RESETING);
2856+
this->wait(mtd, FL_RESETTING);
28572857

28582858
status = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);
28592859
status &= 0x60;
@@ -2924,7 +2924,7 @@ static int do_otp_read(struct mtd_info *mtd, loff_t from, size_t len,
29242924

29252925
/* Exit OTP access mode */
29262926
this->command(mtd, ONENAND_CMD_RESET, 0, 0);
2927-
this->wait(mtd, FL_RESETING);
2927+
this->wait(mtd, FL_RESETTING);
29282928

29292929
return ret;
29302930
}
@@ -2968,7 +2968,7 @@ static int do_otp_write(struct mtd_info *mtd, loff_t to, size_t len,
29682968

29692969
/* Exit OTP access mode */
29702970
this->command(mtd, ONENAND_CMD_RESET, 0, 0);
2971-
this->wait(mtd, FL_RESETING);
2971+
this->wait(mtd, FL_RESETTING);
29722972

29732973
return ret;
29742974
}
@@ -3008,7 +3008,7 @@ static int do_otp_lock(struct mtd_info *mtd, loff_t from, size_t len,
30083008

30093009
/* Exit OTP access mode */
30103010
this->command(mtd, ONENAND_CMD_RESET, 0, 0);
3011-
this->wait(mtd, FL_RESETING);
3011+
this->wait(mtd, FL_RESETTING);
30123012
} else {
30133013
ops.mode = MTD_OPS_PLACE_OOB;
30143014
ops.ooblen = len;
@@ -3413,7 +3413,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd)
34133413
this->boundary[die] = bdry & FLEXONENAND_PI_MASK;
34143414

34153415
this->command(mtd, ONENAND_CMD_RESET, 0, 0);
3416-
this->wait(mtd, FL_RESETING);
3416+
this->wait(mtd, FL_RESETTING);
34173417

34183418
printk(KERN_INFO "Die %d boundary: %d%s\n", die,
34193419
this->boundary[die], locked ? "(Locked)" : "(Unlocked)");
@@ -3635,7 +3635,7 @@ static int flexonenand_set_boundary(struct mtd_info *mtd, int die,
36353635
ret = this->wait(mtd, FL_WRITING);
36363636
out:
36373637
this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_REG_COMMAND);
3638-
this->wait(mtd, FL_RESETING);
3638+
this->wait(mtd, FL_RESETTING);
36393639
if (!ret)
36403640
/* Recalculate device size on boundary change*/
36413641
flexonenand_get_size(mtd);
@@ -3671,7 +3671,7 @@ static int onenand_chip_probe(struct mtd_info *mtd)
36713671
/* Reset OneNAND to read default register values */
36723672
this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_BOOTRAM);
36733673
/* Wait reset */
3674-
this->wait(mtd, FL_RESETING);
3674+
this->wait(mtd, FL_RESETTING);
36753675

36763676
/* Restore system configuration 1 */
36773677
this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1);

include/linux/mtd/flashchip.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ typedef enum {
4040
FL_READING,
4141
FL_CACHEDPRG,
4242
/* These 4 come from onenand_state_t, which has been unified here */
43-
FL_RESETING,
43+
FL_RESETTING,
4444
FL_OTPING,
4545
FL_PREPARING_ERASE,
4646
FL_VERIFYING_ERASE,

0 commit comments

Comments
 (0)