power supply and reset changes for the v4.15 series
* Misc. minor fixes -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAloMMiIACgkQ2O7X88g7 +po5Tg//cT+BUtyJuzHvBLt59OG7/qkMv5Kkazr6ZQIAD2gLp7aYQjLyqG82bnXI a/vEp0mXY6IWtmUmh0dk/sn8UUBFPyTxxAEKt1z/ygEf8/2Cozcji1QtEfqGpR2S 5EDGneJ4aoLuBmNYEfOmw9ohr6uNhhhSZ46ev0k73pEPGZHU2BxRLDf8/hzuBRX/ w8hMwF/5Mi5dREtjk0axauQwB7xCurxrHHPjaXDhPdYorLJ/xXcXUgc0fX6RvE9p ZIQEy5ESPsYdazSAW/Dtn0UgfFYuscWAh76lAxw3fQrlIbbVdy7rqrnUDJgh9qCP GW8vfK3IQi7oB4Y+H1Iyjl4e2tJKVPRugG8vfSQVWaVM2uVjD5dYTG/c9nPd968h 7waPCpToPkP3Mv5MrXB049KNey06Jm8pMUmSzW2aMQhXHTwTBlubVpz2xCVbYYzM OJtOmv4D5i/qSO1cDvZUosF0yXnkCk0u9ZF9L0JAqznd7s0ZbJES6/Etjwo/TM2R RB5Ucu3nc8QXBhoH+AASPThkG7QmRDkzliaO9fIl18g4LiMAMYMmGB5bhTjc5Eog p7P3uVqMx8z9yqouX9+eJC6PbgiLm+oHesO6w4lxqFp/izeDvgQZrlRFqMAWxftU jLVSvkPjPD6JVdUG4cbkZfwyJ1doOS6djbmKC9Pi8kc01xV5nuY= =9LP+ -----END PGP SIGNATURE----- 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:
commit
19b9aaf8a5
|
@ -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 @@ static int gab_get_property(struct power_supply *psy,
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user