Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106971
b: refs/heads/master
c: 56edb58
h: refs/heads/master
i:
  106969: 992898a
  106967: 4ba8d49
v: v3
  • Loading branch information
Mike Rapoport authored and Samuel Ortiz committed Jul 28, 2008
1 parent 656d5fe commit 894046b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 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: 7f71ac9374fec066e428892a68db158946cee1fb
refs/heads/master: 56edb58be157a06dc147a988af3588059556d392
2 changes: 1 addition & 1 deletion trunk/drivers/mfd/mfd-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static int mfd_add_device(struct platform_device *parent,
pdev->dev.parent = &parent->dev;

ret = platform_device_add_data(pdev,
cell, sizeof(struct mfd_cell));
cell->platform_data, cell->data_size);
if (ret)
goto fail_device;

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/mfd/tc6393xb.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
tc6393xb_attach_irq(dev);

tc6393xb_cells[TC6393XB_CELL_NAND].driver_data = tcpd->nand_data;
tc6393xb_cells[TC6393XB_CELL_NAND].platform_data =
&tc6393xb_cells[TC6393XB_CELL_NAND];
tc6393xb_cells[TC6393XB_CELL_NAND].data_size =
sizeof(tc6393xb_cells[TC6393XB_CELL_NAND]);

retval = mfd_add_devices(dev,
tc6393xb_cells, ARRAY_SIZE(tc6393xb_cells),
Expand Down
13 changes: 7 additions & 6 deletions trunk/include/linux/mfd/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ struct mfd_cell {
int (*suspend)(struct platform_device *dev);
int (*resume)(struct platform_device *dev);

void *driver_data; /* driver-specific data */
/* driver-specific data for MFD-aware "cell" drivers */
void *driver_data;

/* platform_data can be used to either pass data to "generic"
driver or as a hook to mfd_cell for the "cell" drivers */
void *platform_data;
size_t data_size;

/*
* This resources can be specified relatievly to the parent device.
Expand All @@ -39,11 +45,6 @@ struct mfd_cell {
const struct resource *resources;
};

static inline struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
{
return (struct mfd_cell *)pdev->dev.platform_data;
}

extern int mfd_add_devices(struct platform_device *parent,
const struct mfd_cell *cells, int n_devs,
struct resource *mem_base,
Expand Down

0 comments on commit 894046b

Please sign in to comment.