Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2484494rda; Wed, 25 Oct 2023 04:19:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEttPTyiQrw2WLaqnP7UBs7obAwoGoHozk5gPuhvoKkA6lXJFt297/XnO63oAMO1B1M34H4 X-Received: by 2002:a25:389:0:b0:d9a:5ff4:cfde with SMTP id 131-20020a250389000000b00d9a5ff4cfdemr15978965ybd.13.1698232763011; Wed, 25 Oct 2023 04:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698232762; cv=none; d=google.com; s=arc-20160816; b=GYmY+Hy+i61FOOsRDw8c+sZ8OXXPXbeVIjwhmOfJzRjlMPWPY/t/sEd+Pd9aSnyLC+ ftjwl72cAB3LPkYcWLp6WzawETkxIV6tzXKAf2YFlr4tfdOsJp0hIIyWZ61T+rsS+/UR FlkdJjTr/1jSDwL0DJ+0N7AhW4lFcISUpNoMBYF+phhjgj4Olzrlda+p/ZrendDE6CvS QItmdfwQPDewLxtgKTknKhdBdxhRWGR6Kkz1vI+GDQWih7l8s3b5r+Dk7KdoOEvTGzvt kNgB+St0ZnbM7D8HQAob1JyYybY0BAP6wsu0oWhaHyQeJ8uDloii+1cIlRHk7YyYppDH TAcw== 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=Vi1MrwT3sXCfIi9+BC5HT47z4ZkovUj0p/fnnz2an/o=; fh=yqoav7EnEdJ2mT+rtoecryk3HwWdUT86ZBxH2AVEvUc=; b=li7T7k6dj9xEpUsY5rh06x6c7tCb4Qi6dTyETgfhfanHyVIerWyUTYNh0GPNJZ+f0s zpJ5RDWcWRmd4fITV7XGU1fHFt83fGAdylPie0nmtjsHrVSu3xqxJnW9w3VIt7WOLUTQ h+7VtxA0fjW2gukL51y5fmWeYF8CECrtRNByeSvIA+dwBrf45mDF2GmhwAZlJRoGH6UR ZHunX4QWf2VJJt2mUkFneVO7wvaqqOGadklvTuDjd7543JYPskzdz+SB4bDdB+UxVlf1 CkdjONpdhEdHA3lRgq2JfE2xrPY8Qvzyf6TXDlP0IMKcytiN+vL7Vpr0LYuqcRTaiv1F QPVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YMPxpEXU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h9-20020a25d009000000b00d9a5aedd594si10284696ybg.234.2023.10.25.04.19.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 04:19:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YMPxpEXU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id A3D5D80BB23A; Wed, 25 Oct 2023 04:19:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234687AbjJYLSp (ORCPT + 99 others); Wed, 25 Oct 2023 07:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234568AbjJYLSj (ORCPT ); Wed, 25 Oct 2023 07:18:39 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26277186; Wed, 25 Oct 2023 04:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698232717; x=1729768717; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZnEsI21T+BVIgOU+yWrQFs6Jq1f1Hh4Po/SFx2T8n10=; b=YMPxpEXUr1TQoE1HGFxTmvRZ9oXwYLg6mbK1e6QuqrIeh+lXwAp2Heqk y0h/5V3oVwsZZQE8xmpT9z/y2sE8AirxcwApfc3Fyg/LipsdWh5x5Z6u6 UUrAUr/WKYJJiS48msyHzWaXMdKJ296MntleByd8z6I23u/Etztc6gpwL HiiDf639iEOcS7X74Jb8QAY7oRvCtErkqCCTmy3xeTUxqm5PUd/k4OiFI sEbDTGf2xnOpBAtNUYzjUeMeMwhjYPQhaA0Jta12kBw0bJoGI8CG54FCY MpbpbZPIIKDTtDX1UxT2rcJTmtywXi2ekiSkk+QMhd1DurNGRfbO+re1w w==; X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="391154634" X-IronPort-AV: E=Sophos;i="6.03,250,1694761200"; d="scan'208";a="391154634" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 04:18:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="762425130" X-IronPort-AV: E=Sophos;i="6.03,250,1694761200"; d="scan'208";a="762425130" Received: from powerlab.fi.intel.com ([10.237.71.25]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 04:18:26 -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 v1 5/6] ACPI: acpi_video: Rename ACPI device instances from device to adev Date: Wed, 25 Oct 2023 14:18:05 +0300 Message-ID: <20231025111806.2416524-6-michal.wilczynski@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231025111806.2416524-1-michal.wilczynski@intel.com> References: <20231025111806.2416524-1-michal.wilczynski@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Wed, 25 Oct 2023 04:19:19 -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 relevant ACPI devices to adev, as corresponding platform devices are called pdev. Signed-off-by: Michal Wilczynski --- drivers/acpi/acpi_video.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index 5b9fb3374a2e..bfc7f51a527d 100644 --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -1526,7 +1526,7 @@ static int acpi_video_bus_stop_devices(struct acpi_video_bus *video) static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) { struct acpi_video_bus *video = data; - struct acpi_device *device = video->device; + struct acpi_device *adev = video->device; struct input_dev *input; int keycode = 0; @@ -1559,12 +1559,12 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) break; default: - acpi_handle_debug(device->handle, "Unsupported event [0x%x]\n", + acpi_handle_debug(adev->handle, "Unsupported event [0x%x]\n", event); break; } - if (acpi_notifier_call_chain(device, event, 0)) + if (acpi_notifier_call_chain(adev, event, 0)) /* Something vetoed the keypress. */ keycode = 0; @@ -1971,16 +1971,16 @@ static int instance; static int acpi_video_bus_probe(struct platform_device *pdev) { - struct acpi_device *device = ACPI_COMPANION(&pdev->dev); + struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); struct acpi_video_bus *video; bool auto_detect; int error; acpi_status status; status = acpi_walk_namespace(ACPI_TYPE_DEVICE, - acpi_dev_parent(device)->handle, 1, - acpi_video_bus_match, NULL, - device, NULL); + acpi_dev_parent(adev)->handle, 1, + acpi_video_bus_match, NULL, + adev, NULL); if (status == AE_ALREADY_EXISTS) { pr_info(FW_BUG "Duplicate ACPI video bus devices for the" @@ -1996,21 +1996,21 @@ static int acpi_video_bus_probe(struct platform_device *pdev) return -ENOMEM; /* a hack to fix the duplicate name "VID" problem on T61 */ - if (!strcmp(device->pnp.bus_id, "VID")) { + if (!strcmp(adev->pnp.bus_id, "VID")) { if (instance) - device->pnp.bus_id[3] = '0' + instance; + adev->pnp.bus_id[3] = '0' + instance; instance++; } /* a hack to fix the duplicate name "VGA" problem on Pa 3553 */ - if (!strcmp(device->pnp.bus_id, "VGA")) { + if (!strcmp(adev->pnp.bus_id, "VGA")) { if (instance) - device->pnp.bus_id[3] = '0' + instance; + adev->pnp.bus_id[3] = '0' + instance; instance++; } - video->device = device; - strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME); - strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); + video->device = adev; + strcpy(acpi_device_name(adev), ACPI_VIDEO_BUS_NAME); + strcpy(acpi_device_class(adev), ACPI_VIDEO_CLASS); platform_set_drvdata(pdev, video); acpi_video_bus_find_cap(video); @@ -2021,7 +2021,7 @@ static int acpi_video_bus_probe(struct platform_device *pdev) mutex_init(&video->device_list_lock); INIT_LIST_HEAD(&video->video_device_list); - error = acpi_video_bus_get_devices(video, device); + error = acpi_video_bus_get_devices(video, adev); if (error) goto err_put_video; @@ -2029,10 +2029,10 @@ static int acpi_video_bus_probe(struct platform_device *pdev) * HP ZBook Fury 16 G10 requires ACPI video's child devices have _PS0 * evaluated to have functional panel brightness control. */ - acpi_device_fix_up_power_extended(device); + acpi_device_fix_up_power_extended(adev); pr_info("%s [%s] (multi-head: %s rom: %s post: %s)\n", - ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device), + ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(adev), str_yes_no(video->flags.multihead), str_yes_no(video->flags.rom), str_yes_no(video->flags.post)); @@ -2059,7 +2059,7 @@ static int acpi_video_bus_probe(struct platform_device *pdev) if (error) goto err_del; - error = acpi_dev_install_notify_handler(device, ACPI_DEVICE_NOTIFY, + error = acpi_dev_install_notify_handler(adev, ACPI_DEVICE_NOTIFY, acpi_video_bus_notify, video); if (error) goto err_remove; -- 2.41.0