提交 60908855 编写于 作者: J Johan Hovold 提交者: Samuel Ortiz

mfd: Fix return type of lm533 attribute is_visible

Since commit 587a1f16 ("switch ->is_visible() to returning umode_t")
the return type of is_visible is umode_t rather than mode_t.

This silences a compiler warning on some architectures where these types
are not compatible.
Reported-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 3770c75a
...@@ -367,7 +367,7 @@ static umode_t lm3533_attr_is_visible(struct kobject *kobj, ...@@ -367,7 +367,7 @@ static umode_t lm3533_attr_is_visible(struct kobject *kobj,
struct device_attribute *dattr = to_dev_attr(attr); struct device_attribute *dattr = to_dev_attr(attr);
struct lm3533_device_attribute *lattr = to_lm3533_dev_attr(dattr); struct lm3533_device_attribute *lattr = to_lm3533_dev_attr(dattr);
enum lm3533_attribute_type type = lattr->type; enum lm3533_attribute_type type = lattr->type;
mode_t mode = attr->mode; umode_t mode = attr->mode;
if (!lm3533->have_backlights && type == LM3533_ATTR_TYPE_BACKLIGHT) if (!lm3533->have_backlights && type == LM3533_ATTR_TYPE_BACKLIGHT)
mode = 0; mode = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册