BLOCKING_NOTIFIER_INIT(intel_scu_notifier);
EXPORT_SYMBOL_GPL(intel_scu_notifier);
+#define intel_mid_sfi_get_pdata(dev, priv) \
+ ((dev)->get_platform_data ? (dev)->get_platform_data(priv) : NULL)
+
/* parse all the mtimer info to a static mtimer array */
int __init sfi_parse_mtmr(struct sfi_table_header *table)
{
pr_debug("IPC bus, name = %16.16s, irq = 0x%2x\n",
pentry->name, pentry->irq);
- pdata = dev->get_platform_data(pentry);
+ pdata = intel_mid_sfi_get_pdata(dev, pentry);
pdev = platform_device_alloc(pentry->name, 0);
if (pdev == NULL) {
spi_info.max_speed_hz,
spi_info.chip_select);
- pdata = dev->get_platform_data(&spi_info);
+ pdata = intel_mid_sfi_get_pdata(dev, &spi_info);
spi_info.platform_data = pdata;
if (dev->delay)
i2c_info.type,
i2c_info.irq,
i2c_info.addr);
- pdata = dev->get_platform_data(&i2c_info);
+ pdata = intel_mid_sfi_get_pdata(dev, &i2c_info);
i2c_info.platform_data = pdata;
if (dev->delay)
dev = get_device_id(pentry->type, pentry->name);
- if ((dev == NULL) || (dev->get_platform_data == NULL))
+ if (!dev)
continue;
if (dev->device_handler) {