Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251905
b: refs/heads/master
c: 121ea57
h: refs/heads/master
i:
  251903: cf09b58
v: v3
  • Loading branch information
Samuel Ortiz committed May 26, 2011
1 parent cfb696c commit 0a966e6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec71974f2a3ae052cdbb57a92ce3c3b34ebd7b5d
refs/heads/master: 121ea573aeb7e9b1d79effa8ef7970031aebda12
3 changes: 2 additions & 1 deletion trunk/drivers/mfd/asic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,8 @@ static struct mfd_cell asic3_cell_ds1wm = {
.name = "ds1wm",
.enable = ds1wm_enable,
.disable = ds1wm_disable,
.mfd_data = &ds1wm_pdata,
.platform_data = &ds1wm_pdata,
.pdata_size = sizeof(ds1wm_pdata),
.num_resources = ARRAY_SIZE(ds1wm_resources),
.resources = ds1wm_resources,
};
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/mfd/htc-pasic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ static struct mfd_cell ds1wm_cell __initdata = {
.name = "ds1wm",
.enable = ds1wm_enable,
.disable = ds1wm_disable,
.mfd_data = &ds1wm_pdata,
.platform_data = &ds1wm_pdata,
.pdata_size = sizeof(ds1wm_pdata),
.num_resources = 2,
.resources = ds1wm_resources,
};
Expand Down
12 changes: 10 additions & 2 deletions trunk/drivers/w1/masters/ds1wm.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static int ds1wm_find_divisor(int gclk)
static void ds1wm_up(struct ds1wm_data *ds1wm_data)
{
int divisor;
struct ds1wm_driver_data *plat = mfd_get_data(ds1wm_data->pdev);
struct ds1wm_driver_data *plat = ds1wm_data->pdev->dev.platform_data;

if (ds1wm_data->cell->enable)
ds1wm_data->cell->enable(ds1wm_data->pdev);
Expand Down Expand Up @@ -351,13 +351,21 @@ static int ds1wm_probe(struct platform_device *pdev)
ret = -ENOMEM;
goto err0;
}
plat = mfd_get_data(pdev);

/* calculate bus shift from mem resource */
ds1wm_data->bus_shift = resource_size(res) >> 3;

ds1wm_data->pdev = pdev;
ds1wm_data->cell = mfd_get_cell(pdev);
if (!ds1wm_data->cell) {
ret = -ENODEV;
goto err1;
}
plat = pdev->dev.platform_data;
if (!plat) {
ret = -ENODEV;
goto err1;
}

res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
Expand Down

0 comments on commit 0a966e6

Please sign in to comment.