Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
platform/chrome: cros_ec: fix compilation warning
Browse files Browse the repository at this point in the history
When including cros_ec.h solely, the compiler emits the following
warning:
> 'struct cros_ec_device' declared inside parameter list
  will not be visible outside of this definition or declaration

Fix it by forward declaration.

Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20231003080453.4011301-1-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
  • Loading branch information
Tzung-Bi Shih committed Oct 5, 2023
1 parent 2f3dd39 commit a7bad16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/platform/chrome/cros_ec.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include <linux/interrupt.h>

struct cros_ec_device;

int cros_ec_register(struct cros_ec_device *ec_dev);
void cros_ec_unregister(struct cros_ec_device *ec_dev);

Expand Down

0 comments on commit a7bad16

Please sign in to comment.