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

mfd: ucb1x00-assabet: Use DEVICE_ATTR_RO macro

Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes
the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Zhen Lei and committed by
Lee Jones
47ed390b 981ce06a

+1 -1
+1 -1
drivers/mfd/ucb1x00-assabet.c
··· 28 28 ucb1x00_adc_disable(ucb); \ 29 29 return sprintf(buf, "%d\n", val); \ 30 30 } \ 31 - static DEVICE_ATTR(name,0444,name##_show,NULL) 31 + static DEVICE_ATTR_RO(name) 32 32 33 33 UCB1X00_ATTR(vbatt, UCB_ADC_INP_AD1); 34 34 UCB1X00_ATTR(vcharger, UCB_ADC_INP_AD0);