--- zzzz-none-000/linux-4.4.60/drivers/base/core.c 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/drivers/base/core.c 2021-02-04 17:41:59.000000000 +0000 @@ -871,12 +871,14 @@ struct device_node *of_node = dev_of_node(dev); int error; +#if !IS_ENABLED(CONFIG_AVM_THIN_SYSFS) if (of_node) { error = sysfs_create_link(&dev->kobj, &of_node->kobj,"of_node"); if (error) dev_warn(dev, "Error %d creating of_node link\n",error); /* An error here doesn't warrant bringing down the device */ } +#endif if (!dev->class) return 0; @@ -920,8 +922,10 @@ static void device_remove_class_symlinks(struct device *dev) { +#if !IS_ENABLED(AVM_THIN_SYSFS) if (dev_of_node(dev)) sysfs_remove_link(&dev->kobj, "of_node"); +#endif if (!dev->class) return;