]> Git Repo - linux.git/commitdiff
Merge 6.1-rc6 into char-misc-next
authorGreg Kroah-Hartman <[email protected]>
Mon, 21 Nov 2022 09:05:34 +0000 (10:05 +0100)
committerGreg Kroah-Hartman <[email protected]>
Mon, 21 Nov 2022 09:05:34 +0000 (10:05 +0100)
We need the char/misc fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <[email protected]>
1  2 
drivers/firmware/google/coreboot_table.c

index 7748067eb9e6bde206d920e38b970d2946b0a22a,9ca21feb9d454976fd2abb7cfe1da613ec5f9804..2652c396c42368e2342bfca6814a9117ed2b745f
@@@ -97,21 -97,12 +97,21 @@@ static int coreboot_table_populate(stru
                if (!device)
                        return -ENOMEM;
  
 -              dev_set_name(&device->dev, "coreboot%d", i);
                device->dev.parent = dev;
                device->dev.bus = &coreboot_bus_type;
                device->dev.release = coreboot_device_release;
                memcpy(&device->entry, ptr_entry, entry->size);
  
 +              switch (device->entry.tag) {
 +              case LB_TAG_CBMEM_ENTRY:
 +                      dev_set_name(&device->dev, "cbmem-%08x",
 +                                   device->cbmem_entry.id);
 +                      break;
 +              default:
 +                      dev_set_name(&device->dev, "coreboot%d", i);
 +                      break;
 +              }
 +
                ret = device_register(&device->dev);
                if (ret) {
                        put_device(&device->dev);
@@@ -158,12 -149,8 +158,8 @@@ static int coreboot_table_probe(struct 
        if (!ptr)
                return -ENOMEM;
  
-       ret = bus_register(&coreboot_bus_type);
-       if (!ret) {
-               ret = coreboot_table_populate(dev, ptr);
-               if (ret)
-                       bus_unregister(&coreboot_bus_type);
-       }
+       ret = coreboot_table_populate(dev, ptr);
        memunmap(ptr);
  
        return ret;
@@@ -178,7 -165,6 +174,6 @@@ static int __cb_dev_unregister(struct d
  static int coreboot_table_remove(struct platform_device *pdev)
  {
        bus_for_each_dev(&coreboot_bus_type, NULL, NULL, __cb_dev_unregister);
-       bus_unregister(&coreboot_bus_type);
        return 0;
  }
  
@@@ -208,6 -194,32 +203,32 @@@ static struct platform_driver coreboot_
                .of_match_table = of_match_ptr(coreboot_of_match),
        },
  };
- module_platform_driver(coreboot_table_driver);
+ static int __init coreboot_table_driver_init(void)
+ {
+       int ret;
+       ret = bus_register(&coreboot_bus_type);
+       if (ret)
+               return ret;
+       ret = platform_driver_register(&coreboot_table_driver);
+       if (ret) {
+               bus_unregister(&coreboot_bus_type);
+               return ret;
+       }
+       return 0;
+ }
+ static void __exit coreboot_table_driver_exit(void)
+ {
+       platform_driver_unregister(&coreboot_table_driver);
+       bus_unregister(&coreboot_bus_type);
+ }
+ module_init(coreboot_table_driver_init);
+ module_exit(coreboot_table_driver_exit);
  MODULE_AUTHOR("Google, Inc.");
  MODULE_LICENSE("GPL");
This page took 0.061253 seconds and 4 git commands to generate.