Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752384AbdHBOQo (ORCPT ); Wed, 2 Aug 2017 10:16:44 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:49227 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbdHBOQn (ORCPT ); Wed, 2 Aug 2017 10:16:43 -0400 Date: Wed, 2 Aug 2017 16:16:38 +0200 From: Andrew Lunn To: Oleksandr Shamray Cc: gregkh@linuxfoundation.org, arnd@arndb.de, devicetree@vger.kernel.org, jiri@resnulli.us, system-sw-low-level@mellanox.com, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, mec@shout.net, Jiri Pirko , joel@jms.id.au, linux-serial@vger.kernel.org, vadimp@maellanox.com, tklauser@distanz.ch, linux-arm-kernel@lists.infradead.org Subject: Re: [patch v1 1/2] drivers: jtag: Add JTAG core driver Message-ID: <20170802141638.GC25781@lunn.ch> References: <1501679918-20486-1-git-send-email-oleksandrs@mellanox.com> <1501679918-20486-2-git-send-email-oleksandrs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1501679918-20486-2-git-send-email-oleksandrs@mellanox.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 313 Lines: 16 > +void jtag_unregister(struct jtag *jtag) > +{ > + struct device *dev = jtag->dev; > + > + mutex_lock(&jtag_mutex); > + list_add_tail(&jtag->list, &jtag_list); add? > + mutex_unlock(&jtag_mutex); > + cdev_del(&jtag->cdev); > + device_unregister(dev); > + ida_simple_remove(&jtag_ida, jtag->id); > +} Andrew