[PATCH 2/3] zram: Replace pr_info with dev_info in comp_algorithm_store

Salah Triki
2015-08-06T23:04:37Z

dev_info attachs the message to the device. And, the algorithm's name, that
triggers the error, is added to the message.
---
drivers/block/zram/zram_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index bb284db..1c2f8b9 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -369,7 +369,8 @@ static ssize_t comp_algorithm_store(struct device *dev,
down_write(&zram->init_lock);
if (init_done(zram)) {
up_write(&zram->init_lock);
- pr_info("Can't change algorithm for initialized device\n");
+ dev_info(dev, "Can't change algorithm to %s for initialized device\n",
+ buf);
return -EBUSY;
}
strlcpy(zram->compressor, buf, sizeof(zram->compressor));
--
1.9.1