+const struct ccp_vdata ccpv3_platform = {
+ .version = CCP_VERSION(3, 0),
+ .setup = NULL,
+ .perform = &ccp3_actions,
+ .bar = 2,
Platform devices don't use BARs so should probably delete this (unless
you want to make it more generic and then use this value for the
IORESOURCE_MEM entry).
+}
#endif
+int ccp_dev_init(struct ccp_device *ccp)
+{
+ if (ccp->vdata->setup)
+ ccp->vdata->setup(ccp);
+
+ ccp->io_regs = ccp->io_map + ccp->vdata->offset;
This should be before the above call to setup().