public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: Move acpi_bus_get_device() from bus.c to scan.c
@ 2013-07-27 13:24 Rafael J. Wysocki
  2013-09-10  3:52 ` Jonathan Callen
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2013-07-27 13:24 UTC (permalink / raw)
  To: ACPI Devel Maling List; +Cc: LKML

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Subject: ACPI: Move acpi_bus_get_device() from bus.c to scan.c

Move acpi_bus_get_device() from bus.c to scan.c which allows
acpi_bus_data_handler() to become static and clean up the latter.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/bus.c      |   21 ---------------------
 drivers/acpi/scan.c     |   30 ++++++++++++++++++++++--------
 include/acpi/acpi_bus.h |    1 -
 3 files changed, 22 insertions(+), 30 deletions(-)

Index: linux-pm/drivers/acpi/bus.c
===================================================================
--- linux-pm.orig/drivers/acpi/bus.c
+++ linux-pm/drivers/acpi/bus.c
@@ -89,27 +89,6 @@ static struct dmi_system_id dsdt_dmi_tab
                                 Device Management
    -------------------------------------------------------------------------- */
 
-int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
-{
-	acpi_status status;
-
-	if (!device)
-		return -EINVAL;
-
-	/* TBD: Support fixed-feature devices */
-
-	status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device);
-	if (ACPI_FAILURE(status) || !*device) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No context for object [%p]\n",
-				  handle));
-		return -ENODEV;
-	}
-
-	return 0;
-}
-
-EXPORT_SYMBOL(acpi_bus_get_device);
-
 acpi_status acpi_bus_get_status_handle(acpi_handle handle,
 				       unsigned long long *sta)
 {
Index: linux-pm/drivers/acpi/scan.c
===================================================================
--- linux-pm.orig/drivers/acpi/scan.c
+++ linux-pm/drivers/acpi/scan.c
@@ -970,6 +970,28 @@ struct bus_type acpi_bus_type = {
 	.uevent		= acpi_device_uevent,
 };
 
+static void acpi_bus_data_handler(acpi_handle handle, void *context)
+{
+	/* Intentionally empty. */
+}
+
+int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
+{
+	acpi_status status;
+
+	if (!device)
+		return -EINVAL;
+
+	status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device);
+	if (ACPI_FAILURE(status) || !*device) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No context for object [%p]\n",
+				  handle));
+		return -ENODEV;
+	}
+	return 0;
+}
+EXPORT_SYMBOL_GPL(acpi_bus_get_device);
+
 int acpi_device_add(struct acpi_device *device,
 		    void (*release)(struct device *))
 {
@@ -1181,14 +1203,6 @@ acpi_bus_get_ejd(acpi_handle handle, acp
 }
 EXPORT_SYMBOL_GPL(acpi_bus_get_ejd);
 
-void acpi_bus_data_handler(acpi_handle handle, void *context)
-{
-
-	/* TBD */
-
-	return;
-}
-
 static int acpi_bus_extract_wakeup_device_power_package(acpi_handle handle,
 					struct acpi_device_wakeup *wakeup)
 {
Index: linux-pm/include/acpi/acpi_bus.h
===================================================================
--- linux-pm.orig/include/acpi/acpi_bus.h
+++ linux-pm/include/acpi/acpi_bus.h
@@ -371,7 +371,6 @@ extern int unregister_acpi_notifier(stru
  */
 
 int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device);
-void acpi_bus_data_handler(acpi_handle handle, void *context);
 acpi_status acpi_bus_get_status_handle(acpi_handle handle,
 				       unsigned long long *sta);
 int acpi_bus_get_status(struct acpi_device *device);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ACPI: Move acpi_bus_get_device() from bus.c to scan.c
  2013-07-27 13:24 [PATCH] ACPI: Move acpi_bus_get_device() from bus.c to scan.c Rafael J. Wysocki
@ 2013-09-10  3:52 ` Jonathan Callen
  2013-09-10 11:30   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Callen @ 2013-09-10  3:52 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki; +Cc: ACPI Devel Maling List, LKML

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 07/27/2013 09:24 AM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Subject: ACPI: Move acpi_bus_get_device()
> from bus.c to scan.c
> 
> Move acpi_bus_get_device() from bus.c to scan.c which allows acpi_bus_data_handler() to become
> static and clean up the latter.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> --- drivers/acpi/bus.c      |
> 21 --------------------- drivers/acpi/scan.c     |   30 ++++++++++++++++++++++-------- 
> include/acpi/acpi_bus.h |    1 - 3 files changed, 22 insertions(+), 30 deletions(-)
> 
> Index: linux-pm/drivers/acpi/bus.c 
> =================================================================== ---
> linux-pm.orig/drivers/acpi/bus.c +++ linux-pm/drivers/acpi/bus.c @@ -89,27 +89,6 @@ static
> struct dmi_system_id dsdt_dmi_tab Device Management
[cut]
> - -EXPORT_SYMBOL(acpi_bus_get_device); - acpi_status acpi_bus_get_status_handle(acpi_handle
> handle, unsigned long long *sta) { Index: linux-pm/drivers/acpi/scan.c 
> =================================================================== ---
> linux-pm.orig/drivers/acpi/scan.c +++ linux-pm/drivers/acpi/scan.c @@ -970,6 +970,28 @@ struct
> bus_type acpi_bus_type = { .uevent		= acpi_device_uevent, };
> 
[cut]
> +} +EXPORT_SYMBOL_GPL(acpi_bus_get_device); +

Was it intentional to change the EXPORT_SYMBOL to EXPORT_SYMBOL_GPL here?  While I understand that
it is completely unsupported anyway, this change does break at least the latest version of the
proprietary nvidia graphics driver.

- -- 
Jonathan Callen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCgAGBQJSLpeMAAoJELHSF2kinlg4EGEP/2lav3ETWSAs7BqeDGCuacZ4
CqkWJlMJDvYawW443KdBEb8aM27tx+gqNp+ktHkWXuXG97X79yAVTRMggOCuaqkb
AgYJkDXRY+64UWtn2GeCM4vSsBOB86UoSspdZXHzF6JBDXrdd2ZXkpb1q7u1xBdi
SZIz3PxZmBLMVcxu+Bh67e1hRXbxKxfKlF1Zl7MC/9NDnxkZmrOklqY2VamG864a
OkFU12bvgdGCwOnq1gHzDjt2PIjL7RNxY4wPWvnyJ1DDOi2tb5tC7hw8VoUTqUPx
h81QmAY2T/XFWTpfNnmJgrQYw+AE8B1TNz+ciKWRi0VCAAjYdomPCYfjxnfYBvN2
a1RRAUMG7DFOZxzBNE9Yv371zEAKLAt2Kbt5PynSqTiivRu7XJOpz5326Q1P9Csy
HZ369Gu7oC2ErAEv3mO82do5pM6/10DpwFPhY5eGq8l7rdStk8cRdUW1Ivc/d0sx
CDt0ZDVV+bvtduwnMTRiXWIgR2w/iUuNcwU5RfU/2NsJLyXeUoMdR0OHLa1sDSVk
bK3Jc6AAPQG8aV83Je50eFeYUQgYN9DZ2eRR+KtzBFaI4TXXzq3H+1E5QBBqbfc8
6PZuVC+CwMYmmhsozvkyyKIdYVJL0KiWOgaZueNq6Z2Fqiupr4BrMpKvS1rkix4y
Pn0TU7V4arGbXGzJN1VZ
=SHrw
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ACPI: Move acpi_bus_get_device() from bus.c to scan.c
  2013-09-10  3:52 ` Jonathan Callen
@ 2013-09-10 11:30   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2013-09-10 11:30 UTC (permalink / raw)
  To: Jonathan Callen; +Cc: Rafael J. Wysocki, ACPI Devel Maling List, LKML

On Monday, September 09, 2013 11:52:44 PM Jonathan Callen wrote:
> On 07/27/2013 09:24 AM, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Subject: ACPI: Move acpi_bus_get_device()
> > from bus.c to scan.c
> >
> > Move acpi_bus_get_device() from bus.c to scan.c which allows acpi_bus_data_handler() to become
> > static and clean up the latter.
> >
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> --- drivers/acpi/bus.c      |
> > 21 --------------------- drivers/acpi/scan.c     |   30 ++++++++++++++++++++++--------
> > include/acpi/acpi_bus.h |    1 - 3 files changed, 22 insertions(+), 30 deletions(-)
> >
> > Index: linux-pm/drivers/acpi/bus.c
> > =================================================================== ---
> > linux-pm.orig/drivers/acpi/bus.c +++ linux-pm/drivers/acpi/bus.c @@ -89,27 +89,6 @@ static
> > struct dmi_system_id dsdt_dmi_tab Device Management
> [cut]
> > - -EXPORT_SYMBOL(acpi_bus_get_device); - acpi_status acpi_bus_get_status_handle(acpi_handle
> > handle, unsigned long long *sta) { Index: linux-pm/drivers/acpi/scan.c
> > =================================================================== ---
> > linux-pm.orig/drivers/acpi/scan.c +++ linux-pm/drivers/acpi/scan.c @@ -970,6 +970,28 @@ struct
> > bus_type acpi_bus_type = { .uevent		= acpi_device_uevent, };
> >
> [cut]
> > +} +EXPORT_SYMBOL_GPL(acpi_bus_get_device); +
> 
> Was it intentional to change the EXPORT_SYMBOL to EXPORT_SYMBOL_GPL here?

Yes, it was.

> While I understand that it is completely unsupported anyway, this change does
> break at least the latest version of the proprietary nvidia graphics driver.

This commit has been in linux-next for over a month and no one has spoken
a word about this problem.  I'm not going to revert that change now, sorry.

Thanks,
Rafael


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-10 11:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-27 13:24 [PATCH] ACPI: Move acpi_bus_get_device() from bus.c to scan.c Rafael J. Wysocki
2013-09-10  3:52 ` Jonathan Callen
2013-09-10 11:30   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox