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]
Date:	Wed, 22 Jun 2011 13:50:50 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Sangbeom Kim <sbkim73@...sung.com>
Cc:	sameo@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] mfd: Add I2C control support for S5M8751

On Wed, Jun 22, 2011 at 02:53:57PM +0900, Sangbeom Kim wrote:
> Implement the I2C control interface for the S5M8751.
> 
> Signed-off-by: Sangbeom Kim <sbkim73@...sung.com>

If the device doesn't support SPI this could just as well be merged into
the main driver - the reason for splitting with devices that support
both is that it gives more flexibility with what gets built into the
core kernel when both APIs are enabled.

> +static int s5m8751_i2c_read_device(struct s5m8751 *s5m8751, uint8_t reg,
> +					uint8_t *val)
> +{
> +	int ret;
> +	ret = i2c_smbus_read_byte_data(s5m8751->i2c_client, reg);
> +	if (ret < 0) {
> +		dev_err(s5m8751->dev, "failed reading at 0x%02x\n", reg);
> +		return ret;
> +	}
> +	*val = (uint8_t)ret;

Why is this case required?
--
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