Skip to content

Commit

Permalink
wm97xx_battery: Quieten sparse warning (bat_set_pdata not declared)
Browse files Browse the repository at this point in the history
This patch fixes following sparse warning:

drivers/power/wm97xx_battery.c:311:6: warning: symbol 'wm97xx_bat_set_pdata' was not declared. Should it be static?

Note that we can't just include linux/wm97xx_batt.h because the header
is deprecated, and so this pops up:

In file included from drivers/power/wm97xx_battery.c:22:
include/linux/wm97xx_batt.h:6: warning: #warning This file will be removed soon, use wm97xx.h instead!

Since wm97xx_bat_set_pdata() is also deprecated (in favour of pdata
passed via AC97 bus), just workaround the issue by declaring the
function in wm97xx_battery.c.

Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
  • Loading branch information
Anton Vorontsov committed May 2, 2010
1 parent ab6cc8f commit b1458fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/power/wm97xx_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ static void __exit wm97xx_bat_exit(void)
platform_driver_unregister(&wm97xx_bat_driver);
}

/* The interface is deprecated, as well as linux/wm97xx_batt.h */
void wm97xx_bat_set_pdata(struct wm97xx_batt_info *data);

void wm97xx_bat_set_pdata(struct wm97xx_batt_info *data)
{
gpdata = data;
Expand Down

0 comments on commit b1458fb

Please sign in to comment.