index 37209ae01148105e34e912b77882dea41ee70bc9..2d4f9c02dccf29cae8b5e322f046fed2ca252cb4 100644 (file)
struct omap_hwmod *oh;
struct platform_device *pdev;
struct omap_mbox_pdata *pdata;
- u32 pdata_len;
oh = omap_hwmod_lookup("mailbox");
if (!oh) {
}
pdata = (struct omap_mbox_pdata *)oh->dev_attr;
- pdata_len = (pdata->info_cnt * (sizeof(struct omap_mbox_dev_info))) +
- (2 * sizeof(u32));
- pdev = omap_device_build("omap-mailbox", -1, oh, pdata, pdata_len,
+ pdev = omap_device_build("omap-mailbox", -1, oh, pdata, sizeof(*pdata),
NULL, 0, 0);
WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n",
__func__, PTR_ERR(pdev));