From patchwork Tue Jun 28 19:39:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 585688 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FC47C433EF for ; Tue, 28 Jun 2022 19:45:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229904AbiF1Tpt (ORCPT ); Tue, 28 Jun 2022 15:45:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231458AbiF1Tp3 (ORCPT ); Tue, 28 Jun 2022 15:45:29 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B43843BF86; Tue, 28 Jun 2022 12:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656445144; x=1687981144; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EYFhbi3TG2EnqrzqyyS6XxZn5TtJ3mVQBigxsTKAzDo=; b=mfbf2hDgwcJ5v/BLrejs1ZY853B/SjvzvYyXifOuaxOGiHN7NqLJ41Eb hARRI/FY+NeVP3goYtCgayAsJK6eItyw4oTYsAkl0K9KEvHIH5yjiGUY9 wlprsNmY1+azXJN8h1cW6nJbV5MrwCZTI6RP8i2KCNERvM4QtJXlFQQt8 6bIx1SMuEvYOe/EiABRLlGBZsV+SVYEn3esM5ZqYrn9RhUkKGnkgEsjHK e4kMLOefcuZLawo0NF/dQv+SXoArQHbHdsYRz6kDqSoBRf8VpKneGzQbf QdNf2xReZW3rIjdTxTk9VCnKbJy5sNN8E75hBRyNx19yg5BUtU+NzoEmu g==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="270593025" X-IronPort-AV: E=Sophos;i="5.92,229,1650956400"; d="scan'208";a="270593025" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 12:39:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,229,1650956400"; d="scan'208";a="680179279" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 28 Jun 2022 12:39:02 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 40429CE; Tue, 28 Jun 2022 22:39:08 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michael Hennerich , Linus Walleij , Bartosz Golaszewski Subject: [PATCH v1 2/3] gpio: adp5588: Do not use defined value for driver name and compatible Date: Tue, 28 Jun 2022 22:39:04 +0300 Message-Id: <20220628193906.36350-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220628193906.36350-1-andriy.shevchenko@linux.intel.com> References: <20220628193906.36350-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org It's wrong to use defined string literal for three semantically different cases, i.e.: 1) compatible string, which is part of ABI and has to have specific format; 2) I2C ID, which is user space visible and also ABI; 3) driver name, that can be changed. Drop the define and use appropriate string literals in place. While at it, drop comma at terminator entry of OF ID table. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- drivers/gpio/gpio-adp5588.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c index 51ed23ba4645..d6a229a67044 100644 --- a/drivers/gpio/gpio-adp5588.c +++ b/drivers/gpio/gpio-adp5588.c @@ -18,8 +18,6 @@ #include -#define DRV_NAME "adp5588-gpio" - /* * Early pre 4.0 Silicon required to delay readout by at least 25ms, * since the Event Counter Register updated 25ms after the interrupt @@ -422,20 +420,20 @@ static int adp5588_gpio_remove(struct i2c_client *client) } static const struct i2c_device_id adp5588_gpio_id[] = { - {DRV_NAME, 0}, + { "adp5588-gpio" }, {} }; MODULE_DEVICE_TABLE(i2c, adp5588_gpio_id); static const struct of_device_id adp5588_gpio_of_id[] = { - { .compatible = "adi," DRV_NAME, }, - {}, + { .compatible = "adi,adp5588-gpio" }, + {} }; MODULE_DEVICE_TABLE(of, adp5588_gpio_of_id); static struct i2c_driver adp5588_gpio_driver = { .driver = { - .name = DRV_NAME, + .name = "adp5588-gpio", .of_match_table = adp5588_gpio_of_id, }, .probe_new = adp5588_gpio_probe, From patchwork Tue Jun 28 19:39:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 585689 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B58B7C43334 for ; Tue, 28 Jun 2022 19:45:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230099AbiF1Tps (ORCPT ); Tue, 28 Jun 2022 15:45:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231396AbiF1Tp3 (ORCPT ); Tue, 28 Jun 2022 15:45:29 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 829D6393C8; Tue, 28 Jun 2022 12:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656445144; x=1687981144; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+1EpxwGS9Cq1c0vv29dIM1+KCfkLYVP7Y5EIdg4E8Uo=; b=IEnBJc3qECYCzWlsJcpWZeWYFy1ceTP2KFtw2BD1cRaP4GFzds+UC0Li Ik7ubh9R7cGyNhG8htLKLbfrVzP6Ny+pSmwYIP/Ps9ANkKGmRAq6YBC65 9+Nm4WB0xj8NwYir1XGju51iw894T2kzQLaDp///WSsYNc2TYe9Mtqibr Ail/zA3QrEsyrUA+PGsS80rsE/ea2XKUz0m7l3HVrqVPMjbzZ35UvLr3F waQ/spYWG2kPyq7TimCQ0ZdrtjlWDo5i+mDZmnsx0SQTOQsOZSsdTk6a2 +Ko0Cad7QXfu8AutYU+xmrlkW29iOASgLwHiyNZTBYm5OVoWPGj5DXDiF w==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="368145176" X-IronPort-AV: E=Sophos;i="5.92,229,1650956400"; d="scan'208";a="368145176" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 12:39:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,229,1650956400"; d="scan'208";a="767286192" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 28 Jun 2022 12:39:02 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 4BF8314F; Tue, 28 Jun 2022 22:39:08 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michael Hennerich , Linus Walleij , Bartosz Golaszewski Subject: [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically Date: Tue, 28 Jun 2022 22:39:05 +0300 Message-Id: <20220628193906.36350-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220628193906.36350-1-andriy.shevchenko@linux.intel.com> References: <20220628193906.36350-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Sort header inclusion alphabetically. Signed-off-by: Andy Shevchenko --- drivers/gpio/gpio-adp5588.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c index d6a229a67044..d49f12560cde 100644 --- a/drivers/gpio/gpio-adp5588.c +++ b/drivers/gpio/gpio-adp5588.c @@ -6,15 +6,15 @@ * Copyright 2009-2010 Analog Devices Inc. */ -#include -#include -#include -#include #include +#include +#include #include #include +#include #include #include +#include #include