Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp811271pxb; Sat, 18 Sep 2021 19:44:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuCVm3R9FG925U5ummFKlJxKxx+iIHoOahaXco2AbelXOmeLnr0+wtHzckMwAhELEMLVH/ X-Received: by 2002:a05:6402:283:: with SMTP id l3mr21213952edv.399.1632019443982; Sat, 18 Sep 2021 19:44:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632019443; cv=none; d=google.com; s=arc-20160816; b=W0v4xaaA24P5mF1VUm/RHgEu4ZEiC4CM8jzwzW1hUFCBEBsORk5Y/fEYom0fkPZZo5 Kb24NECzP2Lcx3ksNdW3kaE4jLyc7IaTZvtRwzwFiEI9WR2CaAc9wDNjRPjNF6P4O7n8 lJGdGGyMM/DyLmPrRcG1dxZVmBNSEdnjzevp9hm/tzQ79RJtt7D6kXPLfRphte6vDnXn Ajyq/l+n4i1bD5z+/okouueZ2xRWOJt/pjM/VxVaaodlWE1VRdQ+Bbnjl5/gLpfmhxcv TvV3owQweJPRcQCMOqormyHYoE4hhWv5rJGGC2lM0Hx1TynWVmc7XVe/QZXdkVCfORlI mxOw== 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; bh=N+52eZ8rLcXt4+AGAbLkUQpVSSe9QQmzbApYWSPoQZU=; b=yObo/cj2+ipe1WLm6LxpN+mFKqrpVZx8zxSIIp0JVsHH0hP02BEugHcCiIoNl1dXTS PjybQVT3Nu7k0AY6t/2g1VMRt4Ap4PypFZZfpZQ4mJ46FZavK3jLglqxCxxr0+eks6Z+ GwhLxlhvzWJI6v+5DlFQZk8ThUEcn4cFK8u0vQQlaAU0CSR1sGPsqY9DMaKR9UfIUDQ/ vVDJvFtpejLqB6fjL4vwuWMmwNkXwJlD+qrSRIZ4lyeqTokS8aAVCK96PKoucMjE2cAJ cUFz0ZVXhvt2p0bfBN2r1SuFsLWehZ5A92uAekKLwgFELBT02hbrVngC1At0k9/bH4Gv iDwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q22si11561514edw.33.2021.09.18.19.43.07; Sat, 18 Sep 2021 19:44:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237008AbhIRNEC (ORCPT + 99 others); Sat, 18 Sep 2021 09:04:02 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:55566 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236913AbhIRNEA (ORCPT ); Sat, 18 Sep 2021 09:04:00 -0400 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 3.0.0) id a33e0a6c20a406d9; Sat, 18 Sep 2021 15:02:35 +0200 Received: from kreacher.localnet (89-77-51-84.dynamic.chello.pl [89.77.51.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 1475766A569; Sat, 18 Sep 2021 15:02:35 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI , Linux PCI Cc: LKML , Bjorn Helgaas , Mika Westerberg , Andy Shevchenko Subject: [PATCH v1 2/3] ACPI: glue: Drop cleanup callback from struct acpi_bus_type Date: Sat, 18 Sep 2021 14:56:17 +0200 Message-ID: <7964242.T7Z3S40VBb@kreacher> In-Reply-To: <1794818.tdWV9SEqCh@kreacher> References: <1794818.tdWV9SEqCh@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 89.77.51.84 X-CLIENT-HOSTNAME: 89-77-51-84.dynamic.chello.pl X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvtddrudehkedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvjeelgffhiedukedtleekkedvudfggefhgfegjefgueekjeelvefggfdvledutdenucfkphepkeelrdejjedrhedurdekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeekledrjeejrdehuddrkeegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqphgtihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehhvghlghgrrghssehkvghrnhgvlhdrohhrghdprhgtphhtthhopehmihhkrgdrfigvshhtvghrsggvrhhgsehlihhn uhigrdhinhhtvghlrdgtohhmpdhrtghpthhtoheprghnughrihihrdhshhgvvhgthhgvnhhkoheslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Since PCI was the only user of the ->cleanup callback in struct acpi_bus_type and it is not using struct acpi_bus_type any more, drop that callback from there and update acpi_device_notify_remove() accordingly. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/glue.c | 12 +++--------- include/acpi/acpi_bus.h | 1 - 2 files changed, 3 insertions(+), 10 deletions(-) Index: linux-pm/include/acpi/acpi_bus.h =================================================================== --- linux-pm.orig/include/acpi/acpi_bus.h +++ linux-pm/include/acpi/acpi_bus.h @@ -570,7 +570,6 @@ struct acpi_bus_type { bool (*match)(struct device *dev); struct acpi_device * (*find_companion)(struct device *); void (*setup)(struct device *); - void (*cleanup)(struct device *); }; int register_acpi_bus_type(struct acpi_bus_type *); int unregister_acpi_bus_type(struct acpi_bus_type *); Index: linux-pm/drivers/acpi/glue.c =================================================================== --- linux-pm.orig/drivers/acpi/glue.c +++ linux-pm/drivers/acpi/glue.c @@ -337,16 +337,10 @@ void acpi_device_notify_remove(struct de if (!adev) return; - if (dev_is_pci(dev)) { + if (dev_is_pci(dev)) pci_acpi_cleanup(dev, adev); - } else { - struct acpi_bus_type *type = acpi_get_bus_type(dev); - - if (type && type->cleanup) - type->cleanup(dev); - else if (adev->handler && adev->handler->unbind) - adev->handler->unbind(dev); - } + else if (adev->handler && adev->handler->unbind) + adev->handler->unbind(dev); acpi_unbind_one(dev); }