svn commit: r358720 - head/sys/dev/iicbus
Andreas Tobler
andreast at FreeBSD.org
Fri Mar 6 21:25:31 UTC 2020
On 06.03.20 22:21, Andreas Tobler wrote:
> Author: andreast
> Date: Fri Mar 6 21:21:01 2020
> New Revision: 358720
> URL: https://svnweb.freebsd.org/changeset/base/358720
>
> Log:
> - Drop 'All rights reserved'
> - Replace hardcoded size by nitems
The CTLFLAG_MPSAFE I forgot to mention since I have it since years in my
tree. Sorry.
Andreas
>
> Modified:
> head/sys/dev/iicbus/max6690.c
>
> Modified: head/sys/dev/iicbus/max6690.c
> ==============================================================================
> --- head/sys/dev/iicbus/max6690.c Fri Mar 6 21:15:25 2020 (r358719)
> +++ head/sys/dev/iicbus/max6690.c Fri Mar 6 21:21:01 2020 (r358720)
> @@ -2,7 +2,6 @@
> * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
> *
> * Copyright (c) 2010 Andreas Tobler
> - * All rights reserved.
> *
> * Redistribution and use in source and binary forms, with or without
> * modification, are permitted provided that the following conditions
> @@ -124,7 +123,7 @@ max6690_read(device_t dev, uint32_t addr, uint8_t reg,
>
> for (;;)
> {
> - err = iicbus_transfer(dev, msg, 4);
> + err = iicbus_transfer(dev, msg, nitems(msg));
> if (err != 0)
> goto retry;
> if (busy[0] & 0x80)
> @@ -302,8 +301,9 @@ max6690_start(void *xdev)
> "Sensor Information");
> /* I use i to pass the sensor id. */
> SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "temp",
> - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, i % 2,
> - max6690_sensor_sysctl, "IK", sysctl_desc);
> + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE,
> + dev, i % 2,
> + max6690_sensor_sysctl, "IK", sysctl_desc);
>
> }
> /* Dump sensor location & ID. */
>
More information about the svn-src-head
mailing list