From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Hovold Subject: Re: [PATCH] serdev: Restore serdev_device_write_buf for atomic context Date: Tue, 2 May 2017 11:06:38 +0200 Message-ID: <20170502090638.GB2973@localhost> References: <1493380041-14710-1-git-send-email-stefan.wahren@i2se.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1493380041-14710-1-git-send-email-stefan.wahren@i2se.com> Sender: linux-kernel-owner@vger.kernel.org To: Stefan Wahren Cc: Rob Herring , Greg Kroah-Hartman , Jiri Slaby , Sebastian Reichel , Guenter Roeck , Andy Shevchenko , Andrey Smirnov , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-serial@vger.kernel.org On Fri, Apr 28, 2017 at 01:47:21PM +0200, Stefan Wahren wrote: > Starting with commit 6fe729c4bdae ("serdev: Add serdev_device_write > subroutine") the function serdev_device_write_buf cannot be used in > atomic context anymore (mutex_lock is sleeping). So restore the old > behavior. Yeah, preventing use in atomic context seems unnecessary, although any clients writing must now deal with serialisation themselves (as before, and as they should). Calling wait_for_completion in the non-blocking case was also needlessly inefficient. > Signed-off-by: Stefan Wahren > Fixes: 6fe729c4bdae ("serdev: Add serdev_device_write subroutine") Reviewed-by: Johan Hovold Thanks, Johan