Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

leds: turris-omnia: wrap to 80 columns

Although checkpatch changed the max-line-length default to 100 columns,
we still prefer 80 columns somewhere.

Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>

authored by

Marek Behún and committed by
Pavel Machek
5d47ce1d 493d2e43

+24 -19
+24 -19
drivers/leds/leds-turris-omnia.c
··· 12 12 #include <linux/of.h> 13 13 #include "leds.h" 14 14 15 - #define OMNIA_BOARD_LEDS 12 16 - #define OMNIA_LED_NUM_CHANNELS 3 15 + #define OMNIA_BOARD_LEDS 12 16 + #define OMNIA_LED_NUM_CHANNELS 3 17 17 18 - #define CMD_LED_MODE 3 19 - #define CMD_LED_MODE_LED(l) ((l) & 0x0f) 20 - #define CMD_LED_MODE_USER 0x10 18 + #define CMD_LED_MODE 3 19 + #define CMD_LED_MODE_LED(l) ((l) & 0x0f) 20 + #define CMD_LED_MODE_USER 0x10 21 21 22 - #define CMD_LED_STATE 4 23 - #define CMD_LED_STATE_LED(l) ((l) & 0x0f) 24 - #define CMD_LED_STATE_ON 0x10 22 + #define CMD_LED_STATE 4 23 + #define CMD_LED_STATE_LED(l) ((l) & 0x0f) 24 + #define CMD_LED_STATE_ON 0x10 25 25 26 - #define CMD_LED_COLOR 5 27 - #define CMD_LED_SET_BRIGHTNESS 7 28 - #define CMD_LED_GET_BRIGHTNESS 8 26 + #define CMD_LED_COLOR 5 27 + #define CMD_LED_SET_BRIGHTNESS 7 28 + #define CMD_LED_GET_BRIGHTNESS 8 29 29 30 30 struct omnia_led { 31 31 struct led_classdev_mc mc_cdev; ··· 33 33 int reg; 34 34 }; 35 35 36 - #define to_omnia_led(l) container_of(l, struct omnia_led, mc_cdev) 36 + #define to_omnia_led(l) container_of(l, struct omnia_led, mc_cdev) 37 37 38 38 struct omnia_leds { 39 39 struct i2c_client *client; ··· 118 118 CMD_LED_MODE_LED(led->reg) | 119 119 CMD_LED_MODE_USER); 120 120 if (ret < 0) { 121 - dev_err(dev, "Cannot set LED %pOF to software mode: %i\n", np, ret); 121 + dev_err(dev, "Cannot set LED %pOF to software mode: %i\n", np, 122 + ret); 122 123 return ret; 123 124 } 124 125 125 126 /* disable the LED */ 126 - ret = i2c_smbus_write_byte_data(client, CMD_LED_STATE, CMD_LED_STATE_LED(led->reg)); 127 + ret = i2c_smbus_write_byte_data(client, CMD_LED_STATE, 128 + CMD_LED_STATE_LED(led->reg)); 127 129 if (ret < 0) { 128 130 dev_err(dev, "Cannot set LED %pOF brightness: %i\n", np, ret); 129 131 return ret; 130 132 } 131 133 132 - ret = devm_led_classdev_multicolor_register_ext(dev, &led->mc_cdev, &init_data); 134 + ret = devm_led_classdev_multicolor_register_ext(dev, &led->mc_cdev, 135 + &init_data); 133 136 if (ret < 0) { 134 137 dev_err(dev, "Cannot register LED %pOF: %i\n", np, ret); 135 138 return ret; ··· 152 149 * file lives in the device directory of the LED controller, not an individual 153 150 * LED, so it should not confuse users. 154 151 */ 155 - static ssize_t brightness_show(struct device *dev, struct device_attribute *a, char *buf) 152 + static ssize_t brightness_show(struct device *dev, struct device_attribute *a, 153 + char *buf) 156 154 { 157 155 struct i2c_client *client = to_i2c_client(dev); 158 156 struct omnia_leds *leds = i2c_get_clientdata(client); ··· 169 165 return sprintf(buf, "%d\n", ret); 170 166 } 171 167 172 - static ssize_t brightness_store(struct device *dev, struct device_attribute *a, const char *buf, 173 - size_t count) 168 + static ssize_t brightness_store(struct device *dev, struct device_attribute *a, 169 + const char *buf, size_t count) 174 170 { 175 171 struct i2c_client *client = to_i2c_client(dev); 176 172 struct omnia_leds *leds = i2c_get_clientdata(client); ··· 184 180 return -EINVAL; 185 181 186 182 mutex_lock(&leds->lock); 187 - ret = i2c_smbus_write_byte_data(client, CMD_LED_SET_BRIGHTNESS, (u8) brightness); 183 + ret = i2c_smbus_write_byte_data(client, CMD_LED_SET_BRIGHTNESS, 184 + (u8)brightness); 188 185 mutex_unlock(&leds->lock); 189 186 190 187 if (ret < 0)