Merge tag 'for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset updates from Sebastian Reichel: - misc minor fixes * tag 'for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: cpcap-charger: fix incorrect return value check power: supply: replace pr_* with dev_* power: supply: pcf50633-charger: remove redundant variable charging_start power: supply: generic-adc-battery: remove redundant variable pdata power: supply: max8997: Improve a size determination in probe
This commit is contained in:
@@ -484,7 +484,7 @@ static int cpcap_usb_init_irq(struct platform_device *pdev,
|
||||
int irq, error;
|
||||
|
||||
irq = platform_get_irq_byname(pdev, name);
|
||||
if (!irq)
|
||||
if (irq < 0)
|
||||
return -ENODEV;
|
||||
|
||||
error = devm_request_threaded_irq(ddata->dev, irq, NULL,
|
||||
|
@@ -201,14 +201,12 @@ err:
|
||||
static void gab_work(struct work_struct *work)
|
||||
{
|
||||
struct gab *adc_bat;
|
||||
struct gab_platform_data *pdata;
|
||||
struct delayed_work *delayed_work;
|
||||
bool is_plugged;
|
||||
int status;
|
||||
|
||||
delayed_work = to_delayed_work(work);
|
||||
adc_bat = container_of(delayed_work, struct gab, bat_work);
|
||||
pdata = adc_bat->pdata;
|
||||
status = adc_bat->status;
|
||||
|
||||
is_plugged = power_supply_am_i_supplied(adc_bat->psy);
|
||||
|
@@ -146,8 +146,7 @@ static int max8997_battery_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
charger = devm_kzalloc(&pdev->dev, sizeof(struct charger_data),
|
||||
GFP_KERNEL);
|
||||
charger = devm_kzalloc(&pdev->dev, sizeof(*charger), GFP_KERNEL);
|
||||
if (!charger)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@@ -43,7 +43,6 @@ int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma)
|
||||
struct pcf50633_mbc *mbc = platform_get_drvdata(pcf->mbc_pdev);
|
||||
int ret = 0;
|
||||
u8 bits;
|
||||
int charging_start = 1;
|
||||
u8 mbcs2, chgmod;
|
||||
unsigned int mbcc5;
|
||||
|
||||
@@ -58,7 +57,6 @@ int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma)
|
||||
ma = 100;
|
||||
} else {
|
||||
bits = PCF50633_MBCC7_USB_SUSPEND;
|
||||
charging_start = 0;
|
||||
ma = 0;
|
||||
}
|
||||
|
||||
|
@@ -669,7 +669,7 @@ EXPORT_SYMBOL_GPL(power_supply_powers);
|
||||
static void power_supply_dev_release(struct device *dev)
|
||||
{
|
||||
struct power_supply *psy = container_of(dev, struct power_supply, dev);
|
||||
pr_debug("device: '%s': %s\n", dev_name(dev), __func__);
|
||||
dev_dbg(dev, "%s\n", __func__);
|
||||
kfree(psy);
|
||||
}
|
||||
|
||||
|
@@ -743,7 +743,7 @@ static int twl4030bci_state(struct twl4030_bci *bci)
|
||||
|
||||
ret = twl4030_bci_read(TWL4030_BCIMSTATEC, &state);
|
||||
if (ret) {
|
||||
pr_err("twl4030_bci: error reading BCIMSTATEC\n");
|
||||
dev_err(bci->dev, "error reading BCIMSTATEC\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user