Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Mar 2020 22:25:27 +0100
From:      Andreas Tobler <andreast@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r358720 - head/sys/dev/iicbus
Message-ID:  <4901a173-c961-208a-5e94-d22be9867aac@FreeBSD.org>
In-Reply-To: <202003062121.026LL180064742@repo.freebsd.org>
References:  <202003062121.026LL180064742@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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. */
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4901a173-c961-208a-5e94-d22be9867aac>