BigW Consortium Gitlab

Commit 4160cb4d by Ashish Syal

Updated BQ27xxx as previous online version didnt compile

parent 835aa641
......@@ -147,11 +147,13 @@ static int bq27xxx_battery_i2c_bulk_write(struct bq27xxx_device_info *di,
static int bq27xxx_battery_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
dev_info(client->dev, " BQ27xx probe");
struct bq27xxx_device_info *di;
int ret;
char *name;
int num;
dev_info(client->dev, " BQ27xx probe");
/* Get new ID for the new battery device */
mutex_lock(&battery_mutex);
num = idr_alloc(&battery_id, client, 0, 0, GFP_KERNEL);
......
......@@ -2,6 +2,7 @@ sources:
{
bq27xxx_battery_i2c.c
devres_backport.c
}
requires:
......
#include <linux/version.h>
#include <linux/init.h>
#include <linux/module.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/of.h>
#include "device_backport.h"
/**
......@@ -61,5 +63,7 @@ char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...)
return p;
}
EXPORT_SYMBOL_GPL(devm_kasprintf);
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) */
MODULE_LICENSE("GPL");
......@@ -4,7 +4,7 @@
#include <linux/device.h>
#include <linux/of.h>
#include <linux/power_supply.h>
#include <linux/module.h>
#include "power_supply_backport.h"
int power_supply_get_battery_info(struct power_supply *psy,
......@@ -62,3 +62,4 @@ int power_supply_get_battery_info(struct power_supply *psy,
return 0;
}
EXPORT_SYMBOL_GPL(power_supply_get_battery_info);
MODULE_LICENSE("GPL");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment