From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755464AbcJ0T1Y (ORCPT ); Thu, 27 Oct 2016 15:27:24 -0400 Received: from smtp10.smtpout.orange.fr ([80.12.242.132]:34919 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755225AbcJ0T1V (ORCPT ); Thu, 27 Oct 2016 15:27:21 -0400 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 27 Oct 2016 21:27:18 +0200 X-ME-IP: 92.136.207.250 From: Robert Jarzmik To: Charles Keepax Cc: Dmitry Torokhov , Lee Jones , Sebastian Reichel , Jaroslav Kysela , Takashi Iwai , Daniel Mack , Haojian Zhuang , Liam Girdwood , Mark Brown , , , , , , Subject: Re: [PATCH 7/9] Input: wm97xx: split out touchscreen registering References: <1477510907-23495-1-git-send-email-robert.jarzmik@free.fr> <1477510907-23495-8-git-send-email-robert.jarzmik@free.fr> <20161027090233.GF28180@localhost.localdomain> X-URL: http://belgarath.falguerolles.org/ Date: Thu, 27 Oct 2016 21:27:13 +0200 In-Reply-To: <20161027090233.GF28180@localhost.localdomain> (Charles Keepax's message of "Thu, 27 Oct 2016 10:02:33 +0100") Message-ID: <87r3711tke.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Charles Keepax writes: > On Wed, Oct 26, 2016 at 09:41:45PM +0200, Robert Jarzmik wrote: >> diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c >> index 83cf11312fd9..50a110e2988b 100644 > >> +static void wm97xx_remove_battery(struct wm97xx *wm) >> +{ >> + platform_device_put(wm->battery_dev); >> +} > >> @@ -724,10 +757,8 @@ static int wm97xx_remove(struct device *dev) >> { >> struct wm97xx *wm = dev_get_drvdata(dev); >> >> - platform_device_unregister(wm->battery_dev); >> - platform_device_unregister(wm->touch_dev); >> - input_unregister_device(wm->input_dev); >> - kfree(wm); >> + wm97xx_remove_battery(wm); > > The commit message says this is just shifting code around but the > platform_device_unregister for the battery_dev seems to have > turned into a platform_device_put here. Thanks for spotting that, it's clearly a defect in the patch. That implies a v2 at least for this one. Cheers. -- Robert