Received: by 10.192.165.148 with SMTP id m20csp1720657imm; Thu, 26 Apr 2018 00:58:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx48rnFC51DqCHr6UFbkG/oRwkDJXeWnkvOb5O7NrJMMokHLQCg1LdbW6bb+gkpSF+QioMnBc X-Received: by 2002:a17:902:1e3:: with SMTP id b90-v6mr29464158plb.273.1524729497742; Thu, 26 Apr 2018 00:58:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524729497; cv=none; d=google.com; s=arc-20160816; b=YQJt2dt+CNGpdL3wDY6Rn4+YO9L9hlXRsFof+iS9lzGSae6EnVd+wCMra2caN4OAbl sWo6C4TReHQWg8qPD6lgSy3Htmx2RbHptbw1wvJ2fvyn8rEhIXzai069J0qeGKwkqwLC NxyTTp9lHxYBPdoxLWKmPFCvVHFLz5Oinrcq4URh3YJUtoUT5quruuyhCR+TqbB+ys+U 6G5LK7SUuHLDsaCeIgLV9UQYGaY/Crk9G1h0UNeTPDj0Ygv0S6a/nn/X51jQjjBbr/vA AObUTROhKeExS99Q4Hu/MYwcJcdp9uwE7v0KFd1JYiV4lvDopCtQvO9rk8oiI02VHlT2 P72Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=CruXrUN8EQ6Krq3l2zPrvMJXhukTp08vcuHi3y2GmOM=; b=gIZsa7iazgcG3IuEyfiEmewUnQxQNiNfr1neAubYHdHB9q3XfDVIHi56hh/3bTQdg4 66kU8JZSPTA792o6qTjD87dvtRwyTQjCO9mrcvMrFjVFeBoicEu2nGZSyU25SbLz2xCr FRYXB6HlsCczSnkRcDwtMTT2F4XPWbg36HmY0+VdO7ZJkUpVHlcOgfpu3ttZ1XYX/iun 462Pm7TRn5hgqzVJQPvZw7wsAKI0Bfxq5E5haN27VWfHGFhBBSqJSdrBpb2Q+ZjEPpCq pelewQ9CmN/VVvLvBNqHMj+mdek2xq3oKbw/Idh//GcK3DszHYi4KMjPQq11TBZIX+04 W/AQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si15140228pgc.391.2018.04.26.00.58.03; Thu, 26 Apr 2018 00:58:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754183AbeDZHz5 (ORCPT + 99 others); Thu, 26 Apr 2018 03:55:57 -0400 Received: from mga03.intel.com ([134.134.136.65]:47202 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752749AbeDZHzy (ORCPT ); Thu, 26 Apr 2018 03:55:54 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2018 00:55:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,330,1520924400"; d="scan'208";a="53775762" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by orsmga002.jf.intel.com with ESMTP; 26 Apr 2018 00:55:50 -0700 Message-ID: <1524729349.21176.614.camel@linux.intel.com> Subject: Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support From: Andy Shevchenko To: Javier Arteaga Cc: Jacek Anaszewski , Pavel Machek , Dan O'Donovan , Mika Westerberg , Heikki Krogerus , Lee Jones , Linus Walleij , linux-gpio@vger.kernel.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 26 Apr 2018 10:55:49 +0300 In-Reply-To: <20180426023441.f2a7337sjlyd6xhf@localhost> References: <20180421085009.28773-1-javier@emutex.com> <20180421085009.28773-3-javier@emutex.com> <1524672945.21176.594.camel@linux.intel.com> <20180426023441.f2a7337sjlyd6xhf@localhost> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.5-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-04-26 at 03:34 +0100, Javier Arteaga wrote: > On Wed, Apr 25, 2018 at 07:15:45PM +0300, Andy Shevchenko wrote: > > On Sat, 2018-04-21 at 09:50 +0100, Javier Arteaga wrote: > > > +static int __init upboard_led_probe(struct platform_device *pdev) > > > > Are you sure about __init here? > > Not 100% now :) > > My understanding was that in this context, __init allows this probe() > to > be dropped from memory after module load. > > What am I doing wrong there? Just give another thought about it. The keyword(s) here is(are): time to live of the objects in question. It's good to get knowing what unbind- bind means (for built-in drivers). > > > + struct upboard_led_data * const pdata = pdev- > > > > dev.platform_data; > > > > Don't use direct dereference to platform_data. > > Sorry, I don't understand this one. What's the alternative? See other drivers how they do that stuff. Hint: check inline functions in include/linux/device.h. -- Andy Shevchenko Intel Finland Oy