From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH] drivers:input:set driver data to NULL for pcap_keys Date: Mon, 25 Jul 2011 23:45:20 -0700 Message-ID: <20110726064519.GA4520@core.coreip.homeip.net> References: <20110725152106.GB23356@suse.de> <1311608069.3262.8.camel@Allen> <20110725181916.GB6876@core.coreip.homeip.net> <20110725182928.GB1175@sirena.org.uk> <20110725183746.GD6876@core.coreip.homeip.net> <4E2E1897.9020808@cn.fujitsu.com> <20110726043949.GA27720@suse.de> <4E2E5240.4060309@cn.fujitsu.com> <20110726060248.GA3868@suse.de> <4E2E5DEC.60208@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pz0-f42.google.com ([209.85.210.42]:34454 "EHLO mail-pz0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211Ab1GZGpZ (ORCPT ); Tue, 26 Jul 2011 02:45:25 -0400 Received: by pzk37 with SMTP id 37so328324pzk.1 for ; Mon, 25 Jul 2011 23:45:24 -0700 (PDT) Content-Disposition: inline In-Reply-To: <4E2E5DEC.60208@cn.fujitsu.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Wanlong Gao Cc: Greg KH , Mark Brown , Wanlong Gao , linux-input@vger.kernel.org On Tue, Jul 26, 2011 at 02:25:48PM +0800, Wanlong Gao wrote: > On 07/26/2011 02:02 PM, Greg KH wrote: > >On Tue, Jul 26, 2011 at 01:36:00PM +0800, Wanlong Gao wrote: > >>On 07/26/2011 12:39 PM, Greg KH wrote: > >> > >>>>+ > >>>>+ if (drv->remove) { > >>>>+ dev_dbg(_dev, "remove\n"); > >>>>+ status = drv->remove(dev); > >>>>+ } else { > >>>>+ status = 0; > >>>>+ } > >>> > >>>Again, why would remove ever be NULL? > >>> > >>>This whole thing isn't needed at all. > >>> > >>>greg k-h > >>Yeah, I see. > >> > >>But Greg, why does i2c-core do this? > >>like:drivers/i2c/i2c-core.c: > > > >The i2c core has different requirements than the driver core does, > >right? They are two totally different things, please don't assume that > >the rules for one are the same for the other. > > > >greg k-h > > > Hmm...They are totally different things, maybe I see.. Still, it would make sense to clean up platform device's drvdata pointer, so that every platform driver out there does not have to do it on its own. -- Dmitry