vfio/mdev is the last user of class_compat, and it doesn't use it for the intended purpose. See kdoc of class_compat_register(): Compatibility class are meant as a temporary user-space compatibility workaround when converting a family of class devices to a bus devices. In addition it uses only a part of the class_compat functionality. So inline the needed functionality, and afterwards all class_compat code can be removed. Heiner Kallweit (3): driver core: class: add class_pseudo_register vfio/mdev: inline needed class_compat functionality driver core: class: remove class_compat code drivers/base/class.c | 89 ++++------------------------------- drivers/vfio/mdev/mdev_core.c | 12 ++--- include/linux/device/class.h | 8 +--- 3 files changed, 15 insertions(+), 94 deletions(-) -- 2.47.1