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

Commit e295e850 authored by Henrique de Moraes Holschuh's avatar Henrique de Moraes Holschuh Committed by Len Brown
Browse files

ACPI: thinkpad-acpi: add power-management handler capability



Some subdrivers could benefit from resume handling, so add the
infrastructure for simple resume handling.

Signed-off-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 1a343760
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -519,11 +519,27 @@ static struct platform_device *tpacpi_pdev;
static struct class_device *tpacpi_hwmon;
static struct input_dev *tpacpi_inputdev;


static int tpacpi_resume_handler(struct platform_device *pdev)
{
	struct ibm_struct *ibm, *itmp;

	list_for_each_entry_safe(ibm, itmp,
				 &tpacpi_all_drivers,
				 all_drivers) {
		if (ibm->resume)
			(ibm->resume)();
	}

	return 0;
}

static struct platform_driver tpacpi_pdriver = {
	.driver = {
		.name = IBM_DRVR_NAME,
		.owner = THIS_MODULE,
	},
	.resume = tpacpi_resume_handler,
};


+1 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@ struct ibm_struct {
	int (*read) (char *);
	int (*write) (char *);
	void (*exit) (void);
	void (*resume) (void);

	struct list_head all_drivers;