Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a44061aa authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Len Brown
Browse files

ACPICA: Remove wakeup GPE reference counting which is not used



After the previous patch that introduced acpi_gpe_wakeup() and
modified the ACPI suspend and wakeup code to use it, the third
argument of acpi_{enable|disable}_gpe() and the GPE wakeup
reference counter are not necessary any more.  Remove them and
modify all of the users of acpi_{enable|disable}_gpe()
accordingly.  Also drop GPE type constants that aren't used
any more.

Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent e8b6f970
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node *node,
u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list);

acpi_status
acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info);
acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info);

struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
						       u32 gpe_number);
+0 −1
Original line number Diff line number Diff line
@@ -429,7 +429,6 @@ struct acpi_gpe_event_info {
	u8 flags;		/* Misc info about this GPE */
	u8 gpe_number;		/* This GPE */
	u8 runtime_count;	/* References to a run GPE */
	u8 wakeup_count;	/* References to a wake GPE */
};

/* Information about a GPE register pair, one per each status/enable pair in an array */
+8 −13
Original line number Diff line number Diff line
@@ -54,24 +54,24 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context);

/*******************************************************************************
 *
 * FUNCTION:    acpi_ev_update_gpe_enable_masks
 * FUNCTION:    acpi_ev_update_gpe_enable_mask
 *
 * PARAMETERS:  gpe_event_info          - GPE to update
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Updates GPE register enable masks based upon whether there are
 *              references (either wake or run) to this GPE
 * DESCRIPTION: Updates GPE register enable mask based upon whether there are
 *              runtime references to this GPE
 *
 ******************************************************************************/

acpi_status
acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info)
acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info)
{
	struct acpi_gpe_register_info *gpe_register_info;
	u32 register_bit;

	ACPI_FUNCTION_TRACE(ev_update_gpe_enable_masks);
	ACPI_FUNCTION_TRACE(ev_update_gpe_enable_mask);

	gpe_register_info = gpe_event_info->register_info;
	if (!gpe_register_info) {
@@ -81,19 +81,14 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info)
	register_bit = acpi_hw_get_gpe_register_bit(gpe_event_info,
						gpe_register_info);

	/* Clear the wake/run bits up front */
	/* Clear the run bit up front */

	ACPI_CLEAR_BIT(gpe_register_info->enable_for_wake, register_bit);
	ACPI_CLEAR_BIT(gpe_register_info->enable_for_run, register_bit);

	/* Set the mask bits only if there are references to this GPE */
	/* Set the mask bit only if there are references to this GPE */

	if (gpe_event_info->runtime_count) {
		ACPI_SET_BIT(gpe_register_info->enable_for_run, register_bit);
	}

	if (gpe_event_info->wakeup_count) {
		ACPI_SET_BIT(gpe_register_info->enable_for_wake, register_bit);
		ACPI_SET_BIT(gpe_register_info->enable_for_run, (u8)register_bit);
	}

	return_ACPI_STATUS(AE_OK);
+1 −2
Original line number Diff line number Diff line
@@ -529,8 +529,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,

			/* Enable this GPE */

			status = acpi_enable_gpe(gpe_device, gpe_number,
						 ACPI_GPE_TYPE_RUNTIME);
			status = acpi_enable_gpe(gpe_device, gpe_number);
			if (ACPI_FAILURE(status)) {
				ACPI_EXCEPTION((AE_INFO, status,
						"Could not enable GPE 0x%02X",
+1 −2
Original line number Diff line number Diff line
@@ -482,8 +482,7 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
				gpe_device = NULL;
			}

			status = acpi_enable_gpe(gpe_device, gpe_number,
						 ACPI_GPE_TYPE_RUNTIME);
			status = acpi_enable_gpe(gpe_device, gpe_number);
			if (ACPI_FAILURE(status)) {
				ACPI_EXCEPTION((AE_INFO, status,
						"Could not enable GPE 0x%02X",
Loading