From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030340AbcJ0OIC (ORCPT ); Thu, 27 Oct 2016 10:08:02 -0400 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:44533 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S942162AbcJ0OH6 (ORCPT ); Thu, 27 Oct 2016 10:07:58 -0400 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.wolfsonmicro.com Date: Thu, 27 Oct 2016 10:02:33 +0100 From: Charles Keepax To: Robert Jarzmik 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 Message-ID: <20161027090233.GF28180@localhost.localdomain> References: <1477510907-23495-1-git-send-email-robert.jarzmik@free.fr> <1477510907-23495-8-git-send-email-robert.jarzmik@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1477510907-23495-8-git-send-email-robert.jarzmik@free.fr> User-Agent: Mutt/1.5.23 (2014-03-12) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610270152 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 26, 2016 at 09:41:45PM +0200, Robert Jarzmik wrote: > wm97xx-core does several things in it initialization : > - touchscreen input device setup > - battery device creation > > As the wm97xx is actually a multi-function device handling an audio > codec, a touchscreen, a gpio block and an ADC, reshape the probing to > isolate what is truly input/touchscreen specific from the remaining > part. > > This is only code shuffling, there is no functional change. > > Signed-off-by: Robert Jarzmik > --- > drivers/input/touchscreen/wm97xx-core.c | 193 ++++++++++++++++++-------------- > 1 file changed, 112 insertions(+), 81 deletions(-) > > 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, Charles