zram: use DEVICE_ATTR_[RW|RO|WO] to define zram sys device attribute
commit083914eab96fabddfc715f0436e082eb375c5704
authorGanesh Mahendran <opensource.ganesh@gmail.com>
Sat, 13 Dec 2014 00:57:13 +0000 (12 16:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Dec 2014 20:42:50 +0000 (13 12:42 -0800)
treea4d60aa9d39cf9687ee7b047447096673a94edc1
parent181366561ac1e1a7bc3b91dbe45e7614a2f758b9
zram: use DEVICE_ATTR_[RW|RO|WO] to define zram sys device attribute

In current zram, we use DEVICE_ATTR() to define sys device attributes.
SO, we need to set (S_IRUGO | S_IWUSR) permission and other arguments
manually.  Linux already provids the macro DEVICE_ATTR_[RW|RO|WO] to
define sys device attribute.  It is simple and readable.

This patch uses kernel defined macro DEVICE_ATTR_[RW|RO|WO] to define
zram device attribute.

Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/zram/zram_drv.c