[groeck-staging:hwmon-next 34/34] drivers/hwmon/asus_rog_ryujin.c:574: undefined reference to `hid_hw_close'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
head:   57319c16d5cc3d49067c181c5f5ba49613163144
commit: 57319c16d5cc3d49067c181c5f5ba49613163144 [34/34] hwmon: Add driver for ASUS ROG RYUJIN II 360 AIO cooler
config: i386-randconfig-141-20240204 (https://download.01.org/0day-ci/archive/20240204/202402040512.f0f23Wq1-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240204/202402040512.f0f23Wq1-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402040512.f0f23Wq1-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   ld: drivers/hwmon/asus_rog_ryujin.o: in function `rog_ryujin_remove':
>> drivers/hwmon/asus_rog_ryujin.c:574: undefined reference to `hid_hw_close'
>> ld: drivers/hwmon/asus_rog_ryujin.c:575: undefined reference to `hid_hw_stop'
   ld: drivers/hwmon/asus_rog_ryujin.o: in function `rog_ryujin_write_expanded':
>> drivers/hwmon/asus_rog_ryujin.c:161: undefined reference to `hid_hw_output_report'
   ld: drivers/hwmon/asus_rog_ryujin.o: in function `hid_parse':
>> include/linux/hid.h:1118: undefined reference to `hid_open_report'
   ld: drivers/hwmon/asus_rog_ryujin.o: in function `rog_ryujin_probe':
>> drivers/hwmon/asus_rog_ryujin.c:523: undefined reference to `hid_hw_start'
>> ld: drivers/hwmon/asus_rog_ryujin.c:529: undefined reference to `hid_hw_open'
   ld: drivers/hwmon/asus_rog_ryujin.c:564: undefined reference to `hid_hw_stop'
>> ld: drivers/hwmon/asus_rog_ryujin.c:562: undefined reference to `hid_hw_close'
   ld: drivers/hwmon/asus_rog_ryujin.o: in function `rog_ryujin_exit':
>> drivers/hwmon/asus_rog_ryujin.c:600: undefined reference to `hid_unregister_driver'
   ld: drivers/hwmon/asus_rog_ryujin.o: in function `rog_ryujin_init':
>> drivers/hwmon/asus_rog_ryujin.c:595: undefined reference to `__hid_register_driver'


vim +574 drivers/hwmon/asus_rog_ryujin.c

   496	
   497	static int rog_ryujin_probe(struct hid_device *hdev, const struct hid_device_id *id)
   498	{
   499		struct rog_ryujin_data *priv;
   500		int ret;
   501	
   502		priv = devm_kzalloc(&hdev->dev, sizeof(*priv), GFP_KERNEL);
   503		if (!priv)
   504			return -ENOMEM;
   505	
   506		priv->hdev = hdev;
   507		hid_set_drvdata(hdev, priv);
   508	
   509		/*
   510		 * Initialize priv->updated to STATUS_VALIDITY seconds in the past, making
   511		 * the initial empty data invalid for rog_ryujin_read() without the need for
   512		 * a special case there.
   513		 */
   514		priv->updated = jiffies - msecs_to_jiffies(STATUS_VALIDITY);
   515	
   516		ret = hid_parse(hdev);
   517		if (ret) {
   518			hid_err(hdev, "hid parse failed with %d\n", ret);
   519			return ret;
   520		}
   521	
   522		/* Enable hidraw so existing user-space tools can continue to work */
 > 523		ret = hid_hw_start(hdev, HID_CONNECT_HIDRAW);
   524		if (ret) {
   525			hid_err(hdev, "hid hw start failed with %d\n", ret);
   526			return ret;
   527		}
   528	
 > 529		ret = hid_hw_open(hdev);
   530		if (ret) {
   531			hid_err(hdev, "hid hw open failed with %d\n", ret);
   532			goto fail_and_stop;
   533		}
   534	
   535		priv->buffer = devm_kzalloc(&hdev->dev, MAX_REPORT_LENGTH, GFP_KERNEL);
   536		if (!priv->buffer) {
   537			ret = -ENOMEM;
   538			goto fail_and_close;
   539		}
   540	
   541		mutex_init(&priv->status_report_request_mutex);
   542		mutex_init(&priv->buffer_lock);
   543		spin_lock_init(&priv->status_report_request_lock);
   544		init_completion(&priv->cooler_status_received);
   545		init_completion(&priv->controller_status_received);
   546		init_completion(&priv->cooler_duty_received);
   547		init_completion(&priv->controller_duty_received);
   548		init_completion(&priv->cooler_duty_set);
   549		init_completion(&priv->controller_duty_set);
   550	
   551		priv->hwmon_dev = hwmon_device_register_with_info(&hdev->dev, "rog_ryujin",
   552								  priv, &rog_ryujin_chip_info, NULL);
   553		if (IS_ERR(priv->hwmon_dev)) {
   554			ret = PTR_ERR(priv->hwmon_dev);
   555			hid_err(hdev, "hwmon registration failed with %d\n", ret);
   556			goto fail_and_close;
   557		}
   558	
   559		return 0;
   560	
   561	fail_and_close:
 > 562		hid_hw_close(hdev);
   563	fail_and_stop:
   564		hid_hw_stop(hdev);
   565		return ret;
   566	}
   567	
   568	static void rog_ryujin_remove(struct hid_device *hdev)
   569	{
   570		struct rog_ryujin_data *priv = hid_get_drvdata(hdev);
   571	
   572		hwmon_device_unregister(priv->hwmon_dev);
   573	
 > 574		hid_hw_close(hdev);
 > 575		hid_hw_stop(hdev);
   576	}
   577	
   578	static const struct hid_device_id rog_ryujin_table[] = {
   579		{ HID_USB_DEVICE(USB_VENDOR_ID_ASUS_ROG, USB_PRODUCT_ID_RYUJIN_AIO) },
   580		{ }
   581	};
   582	
   583	MODULE_DEVICE_TABLE(hid, rog_ryujin_table);
   584	
   585	static struct hid_driver rog_ryujin_driver = {
   586		.name = "rog_ryujin",
   587		.id_table = rog_ryujin_table,
   588		.probe = rog_ryujin_probe,
   589		.remove = rog_ryujin_remove,
   590		.raw_event = rog_ryujin_raw_event,
   591	};
   592	
   593	static int __init rog_ryujin_init(void)
   594	{
 > 595		return hid_register_driver(&rog_ryujin_driver);
   596	}
   597	
   598	static void __exit rog_ryujin_exit(void)
   599	{
 > 600		hid_unregister_driver(&rog_ryujin_driver);
   601	}
   602	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux