Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp4012952rdg; Wed, 18 Oct 2023 12:10:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHUcIm7K51Tb13F0bAqQroa0PdovuZ9c50oYDVmVZaoC5wmKepUj0RLUCe+ZENAR5t2qXY7 X-Received: by 2002:a17:90a:fd06:b0:27d:1126:1ff6 with SMTP id cv6-20020a17090afd0600b0027d11261ff6mr8464835pjb.8.1697656228586; Wed, 18 Oct 2023 12:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697656228; cv=none; d=google.com; s=arc-20160816; b=FK5I/c3q05kS4lKge4mnRqeiUYzsMVCZGuiLVaTxGuy3KYv8qgvKq3GqCBgnzAa11r khQ1XEZJYjAhxoYX5XLl8hdOgOeprXa0kc6gGk+KVMcDP0PVx8a+nS6ef16+GM4GyW8O 7OKuOXpsg0zTJkKdNj8s4r3b5QkGbYROKgbEtS1RmJIEZ+jv4pPqqcwaVEbI95QdSd2u LgaIWGMO9LO6jcKOI0tVy4wYMsCpZKjLNGw5HzryYKvl8466pE7c6qdkC6PIPvQ6RWOP GI/NE4hsB7eOtcntV2sQrwTCow314ojilDfUs/UGZj41d1PRKnprjva9TE816OtLBVpX akvw== 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=ZrJsC9Ayt3rXbMCs5Dk8Cpjyd10K9+GDy1kd3RFu55w=; fh=yqoav7EnEdJ2mT+rtoecryk3HwWdUT86ZBxH2AVEvUc=; b=oQChlcazHXf6JiaHgAG8dDF0/zT062/2BE/jMgXjXtlVixnLxFSgVBRa4bGo+8fMMw S+vhf1RChC1J/C3tG8x1F46CBlVD1iZgYPyscQxqwHYZbpkTRSdf0WfVcmYwPLB+uQ6J 6IN8xPyPwOCNBxqlDKWfhg5E9fnkgQdP6zd4oFwawRFK0wYnbX3cOC0wNEOvDaRScFBk nvMfTynCxffcFYpUk61naJizrlChlBqtLa28VDjoJTx8FjMZtIsrhsi4vTWqSmJTCgKV 0y6jK+54CT3lyVOj0kZ7x8SY6X+h+kZlkw75lljXTY5WVR781KjM24xHyw5sFHPyKi2Q fHzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eu6gsYLP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id fz23-20020a17090b025700b0026800178358si408877pjb.144.2023.10.18.12.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 12:10:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eu6gsYLP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id DA59681BDF07; Wed, 18 Oct 2023 12:10:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231433AbjJRTKV (ORCPT + 99 others); Wed, 18 Oct 2023 15:10:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231354AbjJRTKR (ORCPT ); Wed, 18 Oct 2023 15:10:17 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BF0011F; Wed, 18 Oct 2023 12:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697656215; x=1729192215; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=v4UODrq8h3M2ue98vfE4pky6De+v+9Ny98Hg4mFpil8=; b=eu6gsYLPWNk0d+IYkdsAnVauBd2Tv+RZ5MNX/cwdyuSbMslAAMGpllHH TwjPekiAP9jo6B/GD1XJkNPjsQvZ5Cdpkse46t+doW1J7DLBFFkELL6se ndpsNRLmk/F073c+aq7SfT4V53xtwio+kDWq+kka1adQbh1jKP4LAeDhR dRhNIIQUJKIn7BIC40lW1xyOIhxKY2Zi/aOSWBP7jktoEnEjW0FobVeb0 mqE2fhorv6HKCXZnEvtK0xxmcR1cJVBBhHj9IOo2OnXE3ew2M+zbxE+P0 zY6//k2ARdVKJe4vIbEyi4lhZWNecJ4w4DbUmzZXyz4oN4rbOnf00amSp w==; X-IronPort-AV: E=McAfee;i="6600,9927,10867"; a="472323324" X-IronPort-AV: E=Sophos;i="6.03,235,1694761200"; d="scan'208";a="472323324" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2023 12:10:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10867"; a="733277300" X-IronPort-AV: E=Sophos;i="6.03,235,1694761200"; d="scan'208";a="733277300" Received: from powerlab.fi.intel.com ([10.237.71.25]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2023 12:10:12 -0700 From: Michal Wilczynski To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: rafael.j.wysocki@intel.com, andriy.shevchenko@linux.intel.com, lenb@kernel.org, Michal Wilczynski Subject: [PATCH v2 3/3] ACPI: acpi_pad: Rename ACPI device from device to adev Date: Wed, 18 Oct 2023 22:09:45 +0300 Message-ID: <20231018190945.252428-4-michal.wilczynski@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231018190945.252428-1-michal.wilczynski@intel.com> References: <20231018190945.252428-1-michal.wilczynski@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 12:10:27 -0700 (PDT) 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/acpi_pad.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 3ede3019d898..32a2c006908b 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c @@ -398,13 +398,13 @@ static void acpi_pad_handle_notify(acpi_handle handle) static void acpi_pad_notify(acpi_handle handle, u32 event, void *data) { - struct acpi_device *device = data; + struct acpi_device *adev = data; switch (event) { case ACPI_PROCESSOR_AGGREGATOR_NOTIFY: acpi_pad_handle_notify(handle); - acpi_bus_generate_netlink_event(device->pnp.device_class, - dev_name(&device->dev), event, 0); + acpi_bus_generate_netlink_event(adev->pnp.device_class, + dev_name(&adev->dev), event, 0); break; default: pr_warn("Unsupported event [0x%x]\n", event); @@ -414,14 +414,15 @@ static void acpi_pad_notify(acpi_handle handle, u32 event, static int acpi_pad_probe(struct platform_device *pdev) { - struct acpi_device *device = ACPI_COMPANION(&pdev->dev); + struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); acpi_status status; - strcpy(acpi_device_name(device), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME); - strcpy(acpi_device_class(device), ACPI_PROCESSOR_AGGREGATOR_CLASS); + strcpy(acpi_device_name(adev), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME); + strcpy(acpi_device_class(adev), ACPI_PROCESSOR_AGGREGATOR_CLASS); + + status = acpi_install_notify_handler(adev->handle, + ACPI_DEVICE_NOTIFY, acpi_pad_notify, adev); - status = acpi_install_notify_handler(device->handle, - ACPI_DEVICE_NOTIFY, acpi_pad_notify, device); if (ACPI_FAILURE(status)) return -ENODEV; @@ -430,13 +431,13 @@ static int acpi_pad_probe(struct platform_device *pdev) static void acpi_pad_remove(struct platform_device *pdev) { - struct acpi_device *device = ACPI_COMPANION(&pdev->dev); + struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); mutex_lock(&isolated_cpus_lock); acpi_pad_idle_cpus(0); mutex_unlock(&isolated_cpus_lock); - acpi_remove_notify_handler(device->handle, + acpi_remove_notify_handler(adev->handle, ACPI_DEVICE_NOTIFY, acpi_pad_notify); } -- 2.41.0