Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753997AbbGPL0A (ORCPT ); Thu, 16 Jul 2015 07:26:00 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:35901 "EHLO mail-oi0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752682AbbGPLZ7 (ORCPT ); Thu, 16 Jul 2015 07:25:59 -0400 MIME-Version: 1.0 In-Reply-To: References: <1435253451-19817-1-git-send-email-grygorii.strashko@ti.com> <1435253451-19817-2-git-send-email-grygorii.strashko@ti.com> Date: Thu, 16 Jul 2015 13:25:58 +0200 Message-ID: Subject: Re: [PATCH 2/2] gpiolib: assign chip owner to dev->driver->owner if not set From: Linus Walleij To: Grygorii Strashko Cc: Alexandre Courbot , Sekhar Nori , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Johan Hovold Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1194 Lines: 34 On Thu, Jul 16, 2015 at 1:22 PM, Linus Walleij wrote: > On Thu, Jun 25, 2015 at 7:30 PM, Grygorii Strashko > wrote: > >> Assign GPIO chip owner field to chip->dev->driver->owner if it was not >> configured by GPIO driver. >> >> Cc: Johan Hovold >> Signed-off-by: Grygorii Strashko > > Patch applied with Alex' review tag. > >> There is also one positive additional side effect: >> lines like below can be removed from a lot of GPIO >> drivers >> rdc321x_gpio_dev->chip.owner = THIS_MODULE; > > Yes let's do this :) Or actually, I have had some second thought to why gpio_chip is duplicating struct members from struct device at all. Why should it even have "owner" and "of_node"? Should we not just rewrite this code to follow the struct device *dev pointer in gpio_chip and use "owner" and "of_node" from there? Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/