diff options
Diffstat (limited to 'arch/x86/platform/intel-mid/sfi.c')
-rw-r--r-- | arch/x86/platform/intel-mid/sfi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c index 2f8196d38f53..3f1c171e5ce3 100644 --- a/arch/x86/platform/intel-mid/sfi.c +++ b/arch/x86/platform/intel-mid/sfi.c | |||
@@ -70,6 +70,9 @@ struct blocking_notifier_head intel_scu_notifier = | |||
70 | BLOCKING_NOTIFIER_INIT(intel_scu_notifier); | 70 | BLOCKING_NOTIFIER_INIT(intel_scu_notifier); |
71 | EXPORT_SYMBOL_GPL(intel_scu_notifier); | 71 | EXPORT_SYMBOL_GPL(intel_scu_notifier); |
72 | 72 | ||
73 | #define intel_mid_sfi_get_pdata(dev, priv) \ | ||
74 | ((dev)->get_platform_data ? (dev)->get_platform_data(priv) : NULL) | ||
75 | |||
73 | /* parse all the mtimer info to a static mtimer array */ | 76 | /* parse all the mtimer info to a static mtimer array */ |
74 | int __init sfi_parse_mtmr(struct sfi_table_header *table) | 77 | int __init sfi_parse_mtmr(struct sfi_table_header *table) |
75 | { | 78 | { |
@@ -334,7 +337,7 @@ static void __init sfi_handle_ipc_dev(struct sfi_device_table_entry *pentry, | |||
334 | 337 | ||
335 | pr_debug("IPC bus, name = %16.16s, irq = 0x%2x\n", | 338 | pr_debug("IPC bus, name = %16.16s, irq = 0x%2x\n", |
336 | pentry->name, pentry->irq); | 339 | pentry->name, pentry->irq); |
337 | pdata = dev->get_platform_data(pentry); | 340 | pdata = intel_mid_sfi_get_pdata(dev, pentry); |
338 | 341 | ||
339 | pdev = platform_device_alloc(pentry->name, 0); | 342 | pdev = platform_device_alloc(pentry->name, 0); |
340 | if (pdev == NULL) { | 343 | if (pdev == NULL) { |
@@ -367,7 +370,7 @@ static void __init sfi_handle_spi_dev(struct sfi_device_table_entry *pentry, | |||
367 | spi_info.max_speed_hz, | 370 | spi_info.max_speed_hz, |
368 | spi_info.chip_select); | 371 | spi_info.chip_select); |
369 | 372 | ||
370 | pdata = dev->get_platform_data(&spi_info); | 373 | pdata = intel_mid_sfi_get_pdata(dev, &spi_info); |
371 | 374 | ||
372 | spi_info.platform_data = pdata; | 375 | spi_info.platform_data = pdata; |
373 | if (dev->delay) | 376 | if (dev->delay) |
@@ -391,7 +394,7 @@ static void __init sfi_handle_i2c_dev(struct sfi_device_table_entry *pentry, | |||
391 | i2c_info.type, | 394 | i2c_info.type, |
392 | i2c_info.irq, | 395 | i2c_info.irq, |
393 | i2c_info.addr); | 396 | i2c_info.addr); |
394 | pdata = dev->get_platform_data(&i2c_info); | 397 | pdata = intel_mid_sfi_get_pdata(dev, &i2c_info); |
395 | i2c_info.platform_data = pdata; | 398 | i2c_info.platform_data = pdata; |
396 | 399 | ||
397 | if (dev->delay) | 400 | if (dev->delay) |
@@ -450,7 +453,7 @@ static int __init sfi_parse_devs(struct sfi_table_header *table) | |||
450 | 453 | ||
451 | dev = get_device_id(pentry->type, pentry->name); | 454 | dev = get_device_id(pentry->type, pentry->name); |
452 | 455 | ||
453 | if ((dev == NULL) || (dev->get_platform_data == NULL)) | 456 | if (!dev) |
454 | continue; | 457 | continue; |
455 | 458 | ||
456 | if (dev->device_handler) { | 459 | if (dev->device_handler) { |