Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753563AbcDUS6L (ORCPT ); Thu, 21 Apr 2016 14:58:11 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:54549 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752205AbcDUS6I (ORCPT ); Thu, 21 Apr 2016 14:58:08 -0400 Date: Thu, 21 Apr 2016 14:58:06 -0400 (EDT) Message-Id: <20160421.145806.264243075732892897.davem@davemloft.net> To: narmstrong@baylibre.com Cc: andrew@lunn.ch, thomas.lendacky@amd.com, mugunthanvnm@ti.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, b.hutchman@gmail.com Subject: Re: [PATCH 1/2] net: ethernet: davinci_emac: Fix Unbalanced pm_runtime_enable From: David Miller In-Reply-To: <1461142573-4276-1-git-send-email-narmstrong@baylibre.com> References: <1461142573-4276-1-git-send-email-narmstrong@baylibre.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 21 Apr 2016 11:58:07 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 783 Lines: 18 From: Neil Armstrong Date: Wed, 20 Apr 2016 10:56:13 +0200 > In order to avoid an Unbalanced pm_runtime_enable in the DaVinci > emac driver when the device is removed and re-probed, and a > pm_runtime_disable() call in davinci_emac_remove(). > > Actually, using unbind/bind on a TI DM8168 SoC gives : > $ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/unbind > net eth1: DaVinci EMAC: davinci_emac_remove() > $ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/bind > davinci_emac 4a120000.ethernet: Unbalanced pm_runtime_enable > > Cc: Brian Hutchinson > Fixes: 3ba97381343b ("net: ethernet: davinci_emac: add pm_runtime support") > Signed-off-by: Neil Armstrong Applied.