lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110621105033.GF22177@opensource.wolfsonmicro.com>
Date:	Tue, 21 Jun 2011 11:50:34 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	MyungJoo Ham <myungjoo.ham@...sung.com>
Cc:	linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Russell King <linux@....linux.org.uk>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Kukjin Kim <kgene.kim@...sung.com>, myungjoo.ham@...il.com,
	dg77.kim@...sung.com
Subject: Re: [PATCH v2 4/4] Exynos4 NURI: support for NTC thermistor

On Tue, Jun 21, 2011 at 11:07:13AM +0900, MyungJoo Ham wrote:

> +#include <linux/platform_data/ntc_thermistor.h>

This doesn't appear to be in mainline.

> +/* NTC Thermistor */
> +static struct platform_device nuri_ncp15wb473_thermistor;
> +static int read_thermistor_uV(void)

Blank line between these two.

> +{
> +	static struct s3c_adc_client *adc;
> +	int val;
> +	s64 converted;
> +
> +	if (!adc) {
> +		adc = s3c_adc_register(&nuri_ncp15wb473_thermistor,
> +				NULL, NULL, 0);
> +		if (IS_ERR_OR_NULL(adc)) {
> +			pr_err("%s: Cannot get adc.\n", __func__);
> +			return adc ? PTR_ERR(adc) : -ENODEV;
> +		}
> +	}

Why not do this in an initcall or in the device registration?  This
looks like working around a limitation of the ntc_thermistor driver
which should be fixed as part of a mainline merge for that.

> +
> +	if (IS_ERR_OR_NULL(adc))
> +		return adc ? PTR_ERR(adc) : -ENODEV;
> +
> +	val = s3c_adc_read(adc, 6);
> +
> +	converted = 3300000LL * (s64) val;
> +	converted >>= 12;
> +
> +	pr_emerg("%s: %d -> %llduV\n", __func__, val, converted);

This looks like debug that was left in by mistake.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ