mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
nvidia-oot: remove module * from class_create()
Remove the module pointer from the class_create() based on following change in core kernel ====== driver core: class: remove module * from class_create() The module pointer in class_create() never actually did anything, and it shouldn't have been requred to be set as a parameter even if it did something. So just remove it and fix up all callers of the function in the kernel tree at the same time. Cc: "Rafael J. Wysocki" <rafael@kernel.org> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ===== Bug 4276500 Change-Id: Ifa0a92a282151ce12dc4a48f4f4b5b9499d3fbd8 Signed-off-by: Shardar Mohammed <smohammed@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2976600 Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
a7810cdbac
commit
4be2dd36bb
@@ -434,7 +434,11 @@ static int host1x_uapi_init(struct host1x_uapi *uapi)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
|
||||
uapi->class = class_create(THIS_MODULE, "host1x-fence");
|
||||
#else
|
||||
uapi->class = class_create("host1x-fence");
|
||||
#endif
|
||||
if (IS_ERR(uapi->class)) {
|
||||
err = PTR_ERR(uapi->class);
|
||||
goto unregister_chrdev_region;
|
||||
|
||||
@@ -111,7 +111,11 @@ static struct device *nvhost_client_device_create(struct platform_device *pdev,
|
||||
struct device *dev;
|
||||
int err;
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
|
||||
pdata->nvhost_class = class_create(THIS_MODULE, pdev->dev.of_node->name);
|
||||
#else
|
||||
pdata->nvhost_class = class_create(pdev->dev.of_node->name);
|
||||
#endif
|
||||
if (IS_ERR(pdata->nvhost_class)) {
|
||||
dev_err(&pdev->dev, "failed to create class\n");
|
||||
return ERR_CAST(pdata->nvhost_class);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/pm.h>
|
||||
#include <linux/cdev.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <uapi/media/cam_fsync.h>
|
||||
|
||||
@@ -910,7 +911,11 @@ static int cam_fsync_find_and_add_groups(struct cam_fsync_controller *controller
|
||||
*/
|
||||
static int cam_fsync_chrdev_init(struct cam_fsync_controller *controller)
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
||||
controller->cam_fsync_class = class_create(THIS_MODULE, CAM_FSYNC_CLASS_NAME);
|
||||
#else
|
||||
controller->cam_fsync_class = class_create(CAM_FSYNC_CLASS_NAME);
|
||||
#endif
|
||||
if (IS_ERR(controller->cam_fsync_class))
|
||||
return PTR_ERR(controller->cam_fsync_class);
|
||||
|
||||
|
||||
@@ -601,7 +601,11 @@ EXPORT_SYMBOL(isp_channel_drv_unregister);
|
||||
*/
|
||||
int isp_channel_drv_init(void)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
isp_channel_class = class_create("capture-isp-channel");
|
||||
#else
|
||||
isp_channel_class = class_create(THIS_MODULE, "capture-isp-channel");
|
||||
#endif
|
||||
if (IS_ERR(isp_channel_class))
|
||||
return PTR_ERR(isp_channel_class);
|
||||
|
||||
|
||||
@@ -743,7 +743,11 @@ EXPORT_SYMBOL(vi_channel_drv_unregister);
|
||||
*/
|
||||
int vi_channel_drv_init(void)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
vi_channel_class = class_create("capture-vi-channel");
|
||||
#else
|
||||
vi_channel_class = class_create(THIS_MODULE, "capture-vi-channel");
|
||||
#endif
|
||||
if (IS_ERR(vi_channel_class))
|
||||
return PTR_ERR(vi_channel_class);
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#define DEVICE_NAME "cdi_tsc"
|
||||
#define CLASS_NAME "cdi_tsc_class"
|
||||
@@ -554,7 +555,11 @@ static int cdi_tsc_probe(struct platform_device *pdev)
|
||||
return majorNumber;
|
||||
}
|
||||
/*Create a class for the device*/
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
tsc_charClass = class_create(CLASS_NAME);
|
||||
#else
|
||||
tsc_charClass = class_create(THIS_MODULE, CLASS_NAME);
|
||||
#endif
|
||||
if (IS_ERR(tsc_charClass)) {
|
||||
unregister_chrdev(majorNumber, DEVICE_NAME);
|
||||
dev_err(controller->dev, "Failed to create the device class\n");
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/cred.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#ifdef CONFIG_TEGRA_VIRTUALIZATION
|
||||
#include <soc/tegra/virt/syscalls.h>
|
||||
@@ -695,7 +696,11 @@ static int nvsciipc_probe(struct platform_device *pdev)
|
||||
ctx->dev = &(pdev->dev);
|
||||
platform_set_drvdata(pdev, ctx);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
ctx->nvsciipc_class = class_create(MODULE_NAME);
|
||||
#else
|
||||
ctx->nvsciipc_class = class_create(THIS_MODULE, MODULE_NAME);
|
||||
#endif
|
||||
if (IS_ERR(ctx->nvsciipc_class)) {
|
||||
ERR("failed to create class: %ld\n",
|
||||
PTR_ERR(ctx->nvsciipc_class));
|
||||
|
||||
@@ -737,7 +737,11 @@ static int nvvc_register_dev(nvvc_dev_t *nvvcdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
nvvcdev->class = class_create("nvvc");
|
||||
#else
|
||||
nvvcdev->class = class_create(THIS_MODULE, "nvvc");
|
||||
#endif
|
||||
if (IS_ERR(nvvcdev->class)) {
|
||||
pr_err("class_create failed\n");
|
||||
err = PTR_ERR(nvvcdev->class);
|
||||
|
||||
@@ -1030,7 +1030,11 @@ static int nvpps_probe(struct platform_device *pdev)
|
||||
|
||||
/* character device setup */
|
||||
#ifndef NVPPS_NO_DT
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
s_nvpps_class = class_create("nvpps");
|
||||
#else
|
||||
s_nvpps_class = class_create(THIS_MODULE, "nvpps");
|
||||
#endif
|
||||
if (IS_ERR(s_nvpps_class)) {
|
||||
dev_err(&pdev->dev, "failed to allocate class\n");
|
||||
return PTR_ERR(s_nvpps_class);
|
||||
@@ -1241,7 +1245,11 @@ static int __init nvpps_init(void)
|
||||
|
||||
printk("%s\n", __FUNCTION__);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
s_nvpps_class = class_create("nvpps");
|
||||
#else
|
||||
s_nvpps_class = class_create(THIS_MODULE, "nvpps");
|
||||
#endif
|
||||
if (IS_ERR(s_nvpps_class)) {
|
||||
printk("nvpps: failed to allocate class\n");
|
||||
return PTR_ERR(s_nvpps_class);
|
||||
|
||||
@@ -239,7 +239,11 @@ static int __init tegra_camchar_init(struct tegra_ivc_driver *drv)
|
||||
}
|
||||
tegra_camchar_major_number = MAJOR(start);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
tegra_camchar_class = class_create("camchar_class");
|
||||
#else
|
||||
tegra_camchar_class = class_create(THIS_MODULE, "camchar_class");
|
||||
#endif
|
||||
if (IS_ERR(tegra_camchar_class)) {
|
||||
pr_alert("camchar: failed to create class\n");
|
||||
ret = PTR_ERR(tegra_camchar_class);
|
||||
|
||||
@@ -298,7 +298,11 @@ static int fsicom_register_device(void)
|
||||
return result;
|
||||
}
|
||||
device_file_major_number = result;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
dev_class = class_create("fsicom_client");
|
||||
#else
|
||||
dev_class = class_create(THIS_MODULE, "fsicom_client");
|
||||
#endif
|
||||
if (dev_class == NULL) {
|
||||
pr_err("%s> Could not create class for device\n", device_name);
|
||||
goto class_fail;
|
||||
|
||||
@@ -489,7 +489,11 @@ static int __init setup_ivc(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
ivc_class = class_create("ivc");
|
||||
#else
|
||||
ivc_class = class_create(THIS_MODULE, "ivc");
|
||||
#endif
|
||||
if (IS_ERR(ivc_class)) {
|
||||
ERR("failed to create ivc class: %ld\n", PTR_ERR(ivc_class));
|
||||
return PTR_ERR(ivc_class);
|
||||
|
||||
@@ -1065,7 +1065,11 @@ static int tegra_hv_pm_ctl_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
data->class = class_create(DRV_NAME);
|
||||
#else
|
||||
data->class = class_create(THIS_MODULE, DRV_NAME);
|
||||
#endif
|
||||
if (IS_ERR(data->class)) {
|
||||
dev_err(data->dev, "%s: Failed to create class, %ld\n",
|
||||
__func__, PTR_ERR(data->class));
|
||||
|
||||
@@ -368,8 +368,13 @@ static int tegra_hv_vcpu_yield_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
major = MAJOR(vcpu_yield_pdev->vcpu_yield_dev);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
vcpu_yield_class =
|
||||
class_create("tegra_hv_vcpu_yield");
|
||||
#else
|
||||
vcpu_yield_class =
|
||||
class_create(THIS_MODULE, "tegra_hv_vcpu_yield");
|
||||
#endif
|
||||
if (IS_ERR(vcpu_yield_class)) {
|
||||
pr_err("failed to create ivc class: %ld\n", PTR_ERR(vcpu_yield_class));
|
||||
result = PTR_ERR(vcpu_yield_class);
|
||||
|
||||
@@ -305,7 +305,11 @@ static int __init setup_ivc_mempool(void)
|
||||
}
|
||||
|
||||
/* register ivc_user class with sysfs */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
ivc_mempool_class = class_create("tegra_uivc_mpool");
|
||||
#else
|
||||
ivc_mempool_class = class_create(THIS_MODULE, "tegra_uivc_mpool");
|
||||
#endif
|
||||
if (IS_ERR(ivc_mempool_class)) {
|
||||
pr_err("user_ivc_mempool: ### failed create sysfs class: %ld\n",
|
||||
PTR_ERR(ivc_mempool_class));
|
||||
|
||||
Reference in New Issue
Block a user