[renesas-drivers:topic/bd9571-toggle-power-switch-v3 1/3] drivers/regulator/bd9571mwv-regulator.c:320:34: error: 'dev_attr_backup_mode' undeclared; did you mean 'of_attach_node'?

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git topic/bd9571-toggle-power-switch-v3
head:   4fda313512471700b88bb8ff2b4d279f8e859c0a
commit: d85ea090054e9994381548062c1089e6fda5aae8 [1/3] regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up"
config: i386-randconfig-x007-201827 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout d85ea090054e9994381548062c1089e6fda5aae8
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/regulator/bd9571mwv-regulator.c: In function 'bd9571mwv_regulator_probe':
   drivers/regulator/bd9571mwv-regulator.c:258:9: warning: unused variable 'ret' [-Wunused-variable]
     int i, ret;
            ^~~
   drivers/regulator/bd9571mwv-regulator.c: In function 'bd9571mwv_regulator_remove':
>> drivers/regulator/bd9571mwv-regulator.c:320:34: error: 'dev_attr_backup_mode' undeclared (first use in this function); did you mean 'of_attach_node'?
     device_remove_file(&pdev->dev, &dev_attr_backup_mode);
                                     ^~~~~~~~~~~~~~~~~~~~
                                     of_attach_node
   drivers/regulator/bd9571mwv-regulator.c:320:34: note: each undeclared identifier is reported only once for each function it appears in

vim +320 drivers/regulator/bd9571mwv-regulator.c

   250	
   251	static int bd9571mwv_regulator_probe(struct platform_device *pdev)
   252	{
   253		struct bd9571mwv *bd = dev_get_drvdata(pdev->dev.parent);
   254		struct regulator_config config = { };
   255		struct bd9571mwv_reg *bdreg;
   256		struct regulator_dev *rdev;
   257		unsigned int val;
 > 258		int i, ret;
   259	
   260		bdreg = devm_kzalloc(&pdev->dev, sizeof(*bdreg), GFP_KERNEL);
   261		if (!bdreg)
   262			return -ENOMEM;
   263	
   264		bdreg->bd = bd;
   265	
   266		platform_set_drvdata(pdev, bdreg);
   267	
   268		config.dev = &pdev->dev;
   269		config.dev->of_node = bd->dev->of_node;
   270		config.driver_data = bd;
   271		config.regmap = bd->regmap;
   272	
   273		for (i = 0; i < ARRAY_SIZE(regulators); i++) {
   274			rdev = devm_regulator_register(&pdev->dev, &regulators[i],
   275						       &config);
   276			if (IS_ERR(rdev)) {
   277				dev_err(bd->dev, "failed to register %s regulator\n",
   278					pdev->name);
   279				return PTR_ERR(rdev);
   280			}
   281		}
   282	
   283		val = 0;
   284		of_property_read_u32(bd->dev->of_node, "rohm,ddr-backup-power", &val);
   285		if (val & ~BD9571MWV_BKUP_MODE_CNT_KEEPON_MASK) {
   286			dev_err(bd->dev, "invalid %s mode %u\n",
   287				"rohm,ddr-backup-power", val);
   288			return -EINVAL;
   289		}
   290		bdreg->bkup_mode_cnt_keepon = val;
   291	
   292		bdreg->rstbmode_level = of_property_read_bool(bd->dev->of_node,
   293							      "rohm,rstbmode-level");
   294		bdreg->rstbmode_pulse = of_property_read_bool(bd->dev->of_node,
   295							      "rohm,rstbmode-pulse");
   296		if (bdreg->rstbmode_level && bdreg->rstbmode_pulse) {
   297			dev_err(bd->dev, "only one rohm,rstbmode-* may be specified");
   298			return -EINVAL;
   299		}
   300	
   301	#ifdef CONFIG_PM_SLEEP
   302		if (bdreg->bkup_mode_cnt_keepon) {
   303			/*
   304			 * Backup mode is enabled by default in pulse mode, but needs
   305			 * explicit user setup in level mode.
   306			 */
   307			bdreg->bkup_mode_enabled = bdreg->rstbmode_pulse;
   308	
   309			ret = device_create_file(&pdev->dev, &dev_attr_backup_mode);
   310			if (ret)
   311				return ret;
   312		}
   313	#endif /* CONFIG_PM_SLEEP */
   314	
   315		return 0;
   316	}
   317	
   318	static int bd9571mwv_regulator_remove(struct platform_device *pdev)
   319	{
 > 320		device_remove_file(&pdev->dev, &dev_attr_backup_mode);
   321		return 0;
   322	}
   323	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux