linux-next: manual merge of the driver-core tree with the batterytree

From: Stephen Rothwell
Date: Wed Nov 28 2012 - 23:16:10 EST


Hi Greg,

Today's linux-next merge of the driver-core tree got a conflict in
drivers/power/abx500_chargalg.c between commit a12810ab9fcf ("ab8500: Add
devicetree support for chargalg") from the battery tree and commit
c8afa6406e60 ("power: remove use of __devinit") from the driver-core tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc drivers/power/abx500_chargalg.c
index dcdc439,19f2541..0000000
--- a/drivers/power/abx500_chargalg.c
+++ b/drivers/power/abx500_chargalg.c
@@@ -1799,37 -1800,15 +1799,37 @@@ static int abx500_chargalg_remove(struc
return 0;
}

+static char *supply_interface[] = {
+ "ab8500_fg",
+};
+
- static int __devinit abx500_chargalg_probe(struct platform_device *pdev)
+ static int abx500_chargalg_probe(struct platform_device *pdev)
{
- struct abx500_bm_plat_data *plat_data;
+ struct device_node *np = pdev->dev.of_node;
+ struct abx500_chargalg *di;
int ret = 0;

- struct abx500_chargalg *di =
- kzalloc(sizeof(struct abx500_chargalg), GFP_KERNEL);
- if (!di)
+ di = devm_kzalloc(&pdev->dev, sizeof(*di), GFP_KERNEL);
+ if (!di) {
+ dev_err(&pdev->dev, "%s no mem for ab8500_chargalg\n", __func__);
return -ENOMEM;
+ }
+ di->bat = pdev->mfd_cell->platform_data;
+ if (!di->bat) {
+ if (np) {
+ ret = bmdevs_of_probe(&pdev->dev, np, &di->bat);
+ if (ret) {
+ dev_err(&pdev->dev,
+ "failed to get battery information\n");
+ return ret;
+ }
+ } else {
+ dev_err(&pdev->dev, "missing dt node for ab8500_chargalg\n");
+ return -EINVAL;
+ }
+ } else {
+ dev_info(&pdev->dev, "falling back to legacy platform data\n");
+ }

/* get device struct */
di->dev = &pdev->dev;
@@@ -1905,14 -1888,12 +1905,14 @@@ free_chargalg_wq
return ret;
}

+static const struct of_device_id ab8500_chargalg_match[] = {
+ { .compatible = "stericsson,ab8500-chargalg", },
+ { },
+};
+
static struct platform_driver abx500_chargalg_driver = {
.probe = abx500_chargalg_probe,
- .remove = __devexit_p(abx500_chargalg_remove),
+ .remove = abx500_chargalg_remove,
.suspend = abx500_chargalg_suspend,
.resume = abx500_chargalg_resume,
.driver = {

Attachment: pgp00000.pgp
Description: PGP signature