Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp538053rdb; Fri, 6 Oct 2023 10:32:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHAF342Oe4EnXyFrEm0h9DlvTL1+zFHYWikAOah99m37pm4iEZSZC6qeLBtB+SvxXUdfhkE X-Received: by 2002:a05:6e02:1545:b0:351:5a80:31c4 with SMTP id j5-20020a056e02154500b003515a8031c4mr10481182ilu.21.1696613521269; Fri, 06 Oct 2023 10:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696613521; cv=none; d=google.com; s=arc-20160816; b=LvgOMxuwQZBblmTTQYb3eb7S6e3kOuRJBMwROoAd1cYlv+snJRqVSRxh0sBfmoUhtj ZQhwnDBQ/YGJNyrKjWO3yC5HTWiHKMRE8EOGzcDCf6cjh8H/sP0Cr7YiTF/B7Ysp4mUP +SFlkTOMuQRSslYstf5LJcBJ34K0M4iIAV3VnsjY/2PSOB0Pc8cNP25SQlBCS1pTIwN+ cQ1RoiFSc1L2naDKhNe75yogsnvTfzRxQoZgx8M4x3UlTdY6uv+LHh+YsSJZg0/drplx EqXIAF5gRv2sSmSM6AlDyIhp7sV4gyXSRGDlhwLkNY3UdxP370cpWOHEPpcdD1u8yLc8 vNfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PCWMhIOHf/4UkSJwqPR35lSMTaaVkoW9GPf/29JE15Y=; fh=pmO2GOaxRwgO5+LItasZBY6NOhKBrZd5NDojoBR8jzw=; b=dB1BgRvQSJAjgJiKM87TJyNifMlbkm1TKkZm3fp7fY4o+pD0afm3f1+bxu1GoAJYG7 pyrnNtBtwfJIV1dnlt0J8gf8GWXOgEAvyy2Lfn/izD9Jq9h+vUgN65hL/aoMcnu1vuYl V+oB+jvh/BFVMJFcr1quv5CLRJmRIQ+k+8Y0+qQGYzGU/dxClLlxPTpqtc//c0IaT3eR ljbjxfzhM+7kh1l3pUmYYlDwjB+cThqucoMMqGi7vYYbKI2szojfq5LMI5E/Dsi2N36A rlGbv+vMWW87tpA1ww/v7Po5rYZqe5fx65J5TIS6xjEJvNo/rwU5nu6ydqwvodFa1TYq 4kIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="fnjbi/Rd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id i184-20020a6387c1000000b005855989b5fesi3832251pge.610.2023.10.06.10.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 10:32:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="fnjbi/Rd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id AE21A83287B3; Fri, 6 Oct 2023 10:31:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233088AbjJFRbc (ORCPT + 99 others); Fri, 6 Oct 2023 13:31:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233036AbjJFRb0 (ORCPT ); Fri, 6 Oct 2023 13:31:26 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85919AD; Fri, 6 Oct 2023 10:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696613484; x=1728149484; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/dzgm7DN8BUE9+1jsM6TP8FvAIgjlWLoklntkWjDi8Q=; b=fnjbi/RdawZe1dXew7UgIooKp3qzNHOr6+T8rkuoHLRlKs7FCIPGFXM0 CHbwgiezoIUmn1Eh7dtIAZDdZD8RvxpgJEVMO4EKa0kxTA49oGfIf09MS cLKw/rlvm9nEkG24oUVMqTNXo6fwMH+r4/hLAsyhPA6976jO+B/9oQdKU HKDIE7g437QMGmK1WK+hDYgWaMCzC+ORcphXfpGEw1JYNcEoRDoD7xgaR vMt92tvkNgRcpOJkANeUMUpqGLL/KnYxduBTtu9mHrP3/wmpCBsN2YvD+ 4OXVYAGT7zE916zt8tQM7wB3SovED4a6BirbCvGvOrgCK2ck5By4FsEFq A==; X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="387676829" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="387676829" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 10:31:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="745937455" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="745937455" Received: from powerlab.fi.intel.com ([10.237.71.25]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 10:31:18 -0700 From: Michal Wilczynski To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev Cc: rafael.j.wysocki@intel.com, andriy.shevchenko@intel.com, lenb@kernel.org, dan.j.williams@intel.com, vishal.l.verma@intel.com, ira.weiny@intel.com, Michal Wilczynski Subject: [PATCH v2 4/6] ACPI: AC: Rename ACPI device from device to adev Date: Fri, 6 Oct 2023 20:30:53 +0300 Message-ID: <20231006173055.2938160-5-michal.wilczynski@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231006173055.2938160-1-michal.wilczynski@intel.com> References: <20231006173055.2938160-1-michal.wilczynski@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 06 Oct 2023 10:31:58 -0700 (PDT) X-Spam-Level: ** Since transformation from ACPI driver to platform driver there are two devices on which the driver operates - ACPI device and platform device. For the sake of reader this calls for the distinction in their naming, to avoid confusion. Rename device to adev, as corresponding platform device is called pdev. Signed-off-by: Michal Wilczynski --- drivers/acpi/ac.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 298defeb5301..bb02e7f5d65a 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -120,7 +120,7 @@ static enum power_supply_property ac_props[] = { static void acpi_ac_notify(acpi_handle handle, u32 event, void *data) { struct acpi_ac *ac = data; - struct acpi_device *device = ACPI_COMPANION(ac->dev); + struct acpi_device *adev = ACPI_COMPANION(ac->dev); switch (event) { default: @@ -141,11 +141,11 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data) msleep(ac_sleep_before_get_state_ms); acpi_ac_get_state(ac); - acpi_bus_generate_netlink_event(device->pnp.device_class, + acpi_bus_generate_netlink_event(adev->pnp.device_class, dev_name(ac->dev), event, ac->state); - acpi_notifier_call_chain(device, event, ac->state); + acpi_notifier_call_chain(adev, event, ac->state); kobject_uevent(&ac->charger->dev.kobj, KOBJ_CHANGE); } } @@ -204,7 +204,7 @@ static const struct dmi_system_id ac_dmi_table[] __initconst = { static int acpi_ac_probe(struct platform_device *pdev) { - struct acpi_device *device = ACPI_COMPANION(&pdev->dev); + struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); struct power_supply_config psy_cfg = {}; struct acpi_ac *ac; int result; @@ -214,8 +214,8 @@ static int acpi_ac_probe(struct platform_device *pdev) return -ENOMEM; ac->dev = &pdev->dev; - strcpy(acpi_device_name(device), ACPI_AC_DEVICE_NAME); - strcpy(acpi_device_class(device), ACPI_AC_CLASS); + strcpy(acpi_device_name(adev), ACPI_AC_DEVICE_NAME); + strcpy(acpi_device_class(adev), ACPI_AC_CLASS); platform_set_drvdata(pdev, ac); @@ -225,7 +225,7 @@ static int acpi_ac_probe(struct platform_device *pdev) psy_cfg.drv_data = ac; - ac->charger_desc.name = acpi_device_bid(device); + ac->charger_desc.name = acpi_device_bid(adev); ac->charger_desc.type = POWER_SUPPLY_TYPE_MAINS; ac->charger_desc.properties = ac_props; ac->charger_desc.num_properties = ARRAY_SIZE(ac_props); @@ -237,13 +237,13 @@ static int acpi_ac_probe(struct platform_device *pdev) goto err_release_ac; } - pr_info("%s [%s] (%s-line)\n", acpi_device_name(device), - acpi_device_bid(device), str_on_off(ac->state)); + pr_info("%s [%s] (%s-line)\n", acpi_device_name(adev), + acpi_device_bid(adev), str_on_off(ac->state)); ac->battery_nb.notifier_call = acpi_ac_battery_notify; register_acpi_notifier(&ac->battery_nb); - result = acpi_dev_install_notify_handler(device, ACPI_ALL_NOTIFY, + result = acpi_dev_install_notify_handler(adev, ACPI_ALL_NOTIFY, acpi_ac_notify, ac); if (result) goto err_unregister; -- 2.41.0