BeardOverflow / msi-ec

GNU General Public License v2.0
150 stars 45 forks source link

fix type to compile for Kernel 6.11 #161

Closed arunk140 closed 2 months ago

arunk140 commented 2 months ago

6.10 - https://www.kernel.org/doc/html/v6.10-rc3/driver-api/driver-model/platform.html#platform-drivers

 int (*remove)(struct platform_device *);

changed to

void (*remove)(struct platform_device *);

in the latest Linux kernel (6.11)

6.11 - https://www.kernel.org/doc/html/latest/driver-api/driver-model/platform.html#platform-drivers

struct platform_driver {
      int (*probe)(struct platform_device *);
      void (*remove)(struct platform_device *);
      void (*shutdown)(struct platform_device *);
      int (*suspend)(struct platform_device *, pm_message_t state);
      int (*resume)(struct platform_device *);
      struct device_driver driver;
      const struct platform_device_id *id_table;
      bool prevent_deferred_probe;
      bool driver_managed_dma;
};
glpnk commented 2 months ago

As 6.11 kernel is not yet mainstream in some distros, like Ubuntu, consider make patch file and add guide to README.

Thanks for your findings.

arunk140 commented 2 months ago

Yep makes sense. Updated the commit with the patch and README changes.

glpnk commented 2 months ago

Thanks for your commit

teackot commented 2 months ago

Thanks!