Skip to content

Commit

Permalink
mfd: Fix return type of lm533 attribute is_visible
Browse files Browse the repository at this point in the history
Since commit 587a1f1 ("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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Johan Hovold authored and Samuel Ortiz committed May 20, 2012
1 parent 3770c75 commit 6090885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mfd/lm3533-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ static umode_t lm3533_attr_is_visible(struct kobject *kobj,
struct device_attribute *dattr = to_dev_attr(attr);
struct lm3533_device_attribute *lattr = to_lm3533_dev_attr(dattr);
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)
mode = 0;
Expand Down

0 comments on commit 6090885

Please sign in to comment.