Skip to content

Commit

Permalink
bq24190_charger: Workaround SS definition problem on i386 builds
Browse files Browse the repository at this point in the history
For __i386__ builds we have:

arch/x86/include/uapi/asm/ptrace-abi.h:#define SS   16

And in the driver:

BQ24190_SYSFS_FIELD_RO(vbus_stat,       SS,     VBUS_STAT)

That breaks the build like this:

drivers/power/bq24190_charger.c:375:138: error: ‘BQ24190_REG_16’
undeclared here (not in a function)
drivers/power/bq24190_charger.c:375:162: error:
‘BQ24190_REG_16_THERM_STAT_MASK’ undeclared here (not in a function)
drivers/power/bq24190_charger.c:375:203: error:
‘BQ24190_REG_16_THERM_STAT_SHIFT’ undeclared here (not
 in a function)

With this commit we workaround the problem by undefining 'SS'.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
  • Loading branch information
Anton Vorontsov committed Aug 29, 2013
1 parent 948dcf9 commit d24fed3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/power/bq24190_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ struct bq24190_sysfs_field_info {
u8 shift;
};

/* On i386 ptrace-abi.h defines SS that breaks the macro calls below. */
#undef SS

static struct bq24190_sysfs_field_info bq24190_sysfs_field_tbl[] = {
/* sysfs name reg field in reg */
BQ24190_SYSFS_FIELD_RW(en_hiz, ISC, EN_HIZ),
Expand Down

0 comments on commit d24fed3

Please sign in to comment.