From: Sergey Senozhatsky Date: Tue, 7 Apr 2015 23:44:43 +0000 (+1000) Subject: zram: cosmetic ZRAM_ATTR_RO code formatting tweak X-Git-Tag: KARO-TXA5-2015-06-26~18^2~232 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=273b0791dae2f0be6752e566c7f511967ff45009;p=karo-tx-linux.git zram: cosmetic ZRAM_ATTR_RO code formatting tweak We currently don't support zram on-demand device creation. The only way to have N zram devices is to specify num_devices module parameter (default value 1). That means that if, for some reason, at some point, user wants to have N + 1 devies he/she must umount all the existing devices, unload the module, load the module passing num_devices equals to N + 1. And do this again, if needed. This patchset introduces zram-control sysfs class, which has two sysfs attrs: - zram_add -- add a new specific (device_id) zram device - zram_remove -- remove a specific (device_id) zram device Usage example: # add a new specific zram device echo 4 > /sys/class/zram-control/zram_add # remove a specific zram device echo 4 > /sys/class/zram-control/zram_remove The patchset also does some cleanups and huge code reorganization. This patch (of 8): Fix a misplaced backslash. Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Cc: Nitin Gupta Signed-off-by: Andrew Morton --- diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 871bd3550cb0..8fc25660cef5 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -44,7 +44,7 @@ static const char *default_compressor = "lzo"; static unsigned int num_devices = 1; #define ZRAM_ATTR_RO(name) \ -static ssize_t name##_show(struct device *d, \ +static ssize_t name##_show(struct device *d, \ struct device_attribute *attr, char *b) \ { \ struct zram *zram = dev_to_zram(d); \