Skip to content

Commit 61fc8d4

Browse files
Uwe Kleine-Königandreas-gaisler
authored andcommitted
sbus: Add prototype for bbc_envctrl_init and bbc_envctrl_cleanup to header
This fixes the following build warning: drivers/sbus/char/bbc_envctrl.c:566:5: error: no previous prototype for ‘bbc_envctrl_init’ [-Werror=missing-prototypes] 566 | int bbc_envctrl_init(struct bbc_i2c_bus *bp) | ^~~~~~~~~~~~~~~~ drivers/sbus/char/bbc_envctrl.c:594:6: error: no previous prototype for ‘bbc_envctrl_cleanup’ [-Werror=missing-prototypes] 594 | void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp) | ^~~~~~~~~~~~~~~~~~~ which in the presence of -Werror=missing-prototypes yields a compiler error. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Andreas Larsson <[email protected]> Signed-off-by: Andreas Larsson <[email protected]> Link: https://lore.kernel.org/r/57bc3b43b405431a486162fb8c2558072e976747.1709591118.git.u.kleine-koenig@pengutronix.de
1 parent 24338a6 commit 61fc8d4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/sbus/char/bbc_i2c.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,6 @@ static struct bbc_i2c_bus * attach_one_i2c(struct platform_device *op, int index
358358
return NULL;
359359
}
360360

361-
extern int bbc_envctrl_init(struct bbc_i2c_bus *bp);
362-
extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp);
363-
364361
static int bbc_i2c_probe(struct platform_device *op)
365362
{
366363
struct bbc_i2c_bus *bp;

drivers/sbus/char/bbc_i2c.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,7 @@ extern int bbc_i2c_readb(struct bbc_i2c_client *, unsigned char *byte, int off);
8282
extern int bbc_i2c_write_buf(struct bbc_i2c_client *, char *buf, int len, int off);
8383
extern int bbc_i2c_read_buf(struct bbc_i2c_client *, char *buf, int len, int off);
8484

85+
extern int bbc_envctrl_init(struct bbc_i2c_bus *bp);
86+
extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp);
87+
8588
#endif /* _BBC_I2C_H */

0 commit comments

Comments
 (0)