lkml.org 
[lkml]   [2005]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] IBM HDAPS accelerometer driver, with probing.
On Fri, Aug 26, 2005 at 06:18:45PM -0400, Robert Love wrote:
> Attached patch provides a driver for the IBM Hard Drive Active
> Protection System (hdaps) on top of 2.6.13-rc6-mm2.

> --- linux-2.6.13-rc6-mm2/drivers/hwmon/hdaps.c
> +++ linux/drivers/hwmon/hdaps.c

> +static int hdaps_probe(struct device *dev)
> +{
> + int ret;
> +
> + ret = accelerometer_init();
> + if (unlikely(ret))

What's the point of having unlikely() attached to every possible if ()?

> +static ssize_t hdaps_temp_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + u8 temp;
> + int ret;
> +
> + ret = accelerometer_readb_one(HDAPS_PORT_TEMP, &temp);
> + if (unlikely(ret < 0))

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-27 00:52    [W:0.132 / U:2.628 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site