summaryrefslogtreecommitdiff
path: root/driver/led
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2018-05-16 11:31:34 +0200
committerchrome-bot <chrome-bot@chromium.org>2018-05-17 19:34:48 -0700
commitae6d7a30c333308a5aebdfc0b7dc012a2a50324a (patch)
tree8b28cbb9bec8a1da7ec9a7447b2a000f0ae066dd /driver/led
parentb3311c23b1fdc38daeb5e169d6e48fa62cac251e (diff)
downloadchrome-ec-ae6d7a30c333308a5aebdfc0b7dc012a2a50324a.tar.gz
make local functions static inline
They're only used within the same file and should always be inlined. It also helps gcc 8.1's lto linking which seems to not inline it (since inline is just a hint) but then drops the function (presumably because it's small, marked inline, and comes with no prototype). BUG=b:65441143 BRANCH=none TEST=builds with gcc 8.1 Change-Id: I881a5b9f13192dd11748d8a3060788f95a84dec0 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/1061075 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@google.com>
Diffstat (limited to 'driver/led')
-rw-r--r--driver/led/lm3509.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/led/lm3509.c b/driver/led/lm3509.c
index 11cacc6251..0f44681659 100644
--- a/driver/led/lm3509.c
+++ b/driver/led/lm3509.c
@@ -10,12 +10,12 @@
#include "keyboard_backlight.h"
#include "lm3509.h"
-inline int lm3509_write(uint8_t reg, uint8_t val)
+static inline int lm3509_write(uint8_t reg, uint8_t val)
{
return i2c_write8(I2C_PORT_KBLIGHT, LM3509_I2C_ADDR, reg, val);
}
-inline int lm3509_read(uint8_t reg, int *val)
+static inline int lm3509_read(uint8_t reg, int *val)
{
return i2c_read8(I2C_PORT_KBLIGHT, LM3509_I2C_ADDR, reg, val);
}