aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/mt29f_spinand/mt29f_spinand.c
diff options
context:
space:
mode:
authorG Pooja Shamili <poojashamili@gmail.com>2016-03-12 05:28:54 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-11 22:14:06 -0800
commit8d4cd9c8e2596e28cb9e13e2e20a493cb082283a (patch)
treebe026d9f0c0d01e5040ec00fb8bdf982b89083c2 /drivers/staging/mt29f_spinand/mt29f_spinand.c
parentstaging: android: ion: fix up file mode (diff)
downloadlinux-dev-8d4cd9c8e2596e28cb9e13e2e20a493cb082283a.tar.xz
linux-dev-8d4cd9c8e2596e28cb9e13e2e20a493cb082283a.zip
staging: mt29f_spinand: Replacing pr_info with dev_info after the call to devm_kzalloc
The function devm_kzalloc has a first argument of type struct device *. This is the type of argument required by printing functions such as dev_info, dev_err, etc. Thus, functions like pr_info should not normally be used after a call to devm_kzalloc. Thus, all pr_info occurances are replaced with dev_info function calls. This was done using Coccinelle, the patch being: @@ expression E1,E2; expression list args; @@ E1 = devm_kzalloc(E2, ...); <... - pr_info( + dev_info(E2, args); ...> Signed-off-by: G Pooja Shamili <poojashamili@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/mt29f_spinand/mt29f_spinand.c')
-rw-r--r--drivers/staging/mt29f_spinand/mt29f_spinand.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.c b/drivers/staging/mt29f_spinand/mt29f_spinand.c
index aa0170e4ef6f..9d47c5db24a6 100644
--- a/drivers/staging/mt29f_spinand/mt29f_spinand.c
+++ b/drivers/staging/mt29f_spinand/mt29f_spinand.c
@@ -893,7 +893,8 @@ static int spinand_probe(struct spi_device *spi_nand)
#else
chip->ecc.mode = NAND_ECC_SOFT;
if (spinand_disable_ecc(spi_nand) < 0)
- pr_info("%s: disable ecc failed!\n", __func__);
+ dev_info(&spi_nand->dev, "%s: disable ecc failed!\n",
+ __func__);
#endif
nand_set_flash_node(chip, spi_nand->dev.of_node);