aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/google/gsmi.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c
index 6eb535ffeddc..e5a67b24587a 100644
--- a/drivers/firmware/google/gsmi.c
+++ b/drivers/firmware/google/gsmi.c
@@ -764,6 +764,13 @@ static __init int gsmi_system_valid(void)
764static struct kobject *gsmi_kobj; 764static struct kobject *gsmi_kobj;
765static struct efivars efivars; 765static struct efivars efivars;
766 766
767static const struct platform_device_info gsmi_dev_info = {
768 .name = "gsmi",
769 .id = -1,
770 /* SMI callbacks require 32bit addresses */
771 .dma_mask = DMA_BIT_MASK(32),
772};
773
767static __init int gsmi_init(void) 774static __init int gsmi_init(void)
768{ 775{
769 unsigned long flags; 776 unsigned long flags;
@@ -776,7 +783,7 @@ static __init int gsmi_init(void)
776 gsmi_dev.smi_cmd = acpi_gbl_FADT.smi_command; 783 gsmi_dev.smi_cmd = acpi_gbl_FADT.smi_command;
777 784
778 /* register device */ 785 /* register device */
779 gsmi_dev.pdev = platform_device_register_simple("gsmi", -1, NULL, 0); 786 gsmi_dev.pdev = platform_device_register_full(&gsmi_dev_info);
780 if (IS_ERR(gsmi_dev.pdev)) { 787 if (IS_ERR(gsmi_dev.pdev)) {
781 printk(KERN_ERR "gsmi: unable to register platform device\n"); 788 printk(KERN_ERR "gsmi: unable to register platform device\n");
782 return PTR_ERR(gsmi_dev.pdev); 789 return PTR_ERR(gsmi_dev.pdev);
@@ -785,10 +792,6 @@ static __init int gsmi_init(void)
785 /* SMI access needs to be serialized */ 792 /* SMI access needs to be serialized */
786 spin_lock_init(&gsmi_dev.lock); 793 spin_lock_init(&gsmi_dev.lock);
787 794
788 /* SMI callbacks require 32bit addresses */
789 gsmi_dev.pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
790 gsmi_dev.pdev->dev.dma_mask =
791 &gsmi_dev.pdev->dev.coherent_dma_mask;
792 ret = -ENOMEM; 795 ret = -ENOMEM;
793 gsmi_dev.dma_pool = dma_pool_create("gsmi", &gsmi_dev.pdev->dev, 796 gsmi_dev.dma_pool = dma_pool_create("gsmi", &gsmi_dev.pdev->dev,
794 GSMI_BUF_SIZE, GSMI_BUF_ALIGN, 0); 797 GSMI_BUF_SIZE, GSMI_BUF_ALIGN, 0);