UPSTREAM: ACPI / fan: fix fan driver compile error when CONFIG_PM_SLEEP is undefined

The ACPI fan driver defines acpi_fan_suspend() and acpi_fan_resume()
when CONFIG_PM_SLEEP is defined. This results in the following compile
errors when CONFIG_PM_SLEEP is undefined:

drivers/acpi/fan.c:60:8: error: ‘acpi_fan_suspend’ undeclared here (not in a function)
drivers/acpi/fan.c:60:8: error: ‘acpi_fan_resume’ undeclared here (not in a function)

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit b108e0ea94a33f85590959a7a7fbcfd6f8ea8ab6)
Signed-off-by: Kaiyen Chang <kaiyen.chang@intel.com>

BUG=chrome-os-partner:28265
TEST=undefine CONFIG_PM_SLEEP and then build the kernel. Should no
longer see the compile errors.

Change-Id: Ia3f9b3b8322661a86692a0763927fe89f9f1fd80
Reviewed-on: https://chromium-review.googlesource.com/236536
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Kaiyen Chang <kaiyen.chang@intel.com>
Tested-by: Kaiyen Chang <kaiyen.chang@intel.com>
UPSTREAM: ACPI / fan: do nothing in suspend and poweroff callback

We put fans to full speed in acpi_fan_suspend(), but that is only
needed in the hibernation case when we are generating hibernation
image, so this patch removes that when we are about to suspend or
poweroff.

References: http://www.spinics.net/lists/linux-acpi/msg48636.html
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit b9b8515f34fa182e26ee934c3a83f24e2d8bd846)
Signed-off-by: Kaiyen Chang <kaiyen.chang@intel.com>

BUG=chrome-os-partner:28265
TEST=build the kernel and then update the device. The fan would
not be set to full speed anymore while entering S3. We will no
longer see the following log in dmesg before suspend. (This means
after updating the kernel we will not see the following log before
"ACPI: Preparing to enter system sleep state S3" in dmesg)

	calling  PNP0C0B:04+ @ xxxx, parent: LNXTHERM:00
	call PNP0C0B:04+ returned 0 after xx usecs
	calling  PNP0C0B:03+ @ xxxx, parent: LNXTHERM:00
	call PNP0C0B:03+ returned 0 after xx usecs
	calling  PNP0C0B:02+ @ xxxx, parent: LNXTHERM:00
	call PNP0C0B:02+ returned 0 after xx usecs
	calling  PNP0C0B:01+ @ xxxx, parent: LNXTHERM:00
	call PNP0C0B:01+ returned 0 after xx usecs
	calling  PNP0C0B:00+ @ xxxx, parent: LNXTHERM:00
	call PNP0C0B:00+ returned 0 after xx usecs

Change-Id: Ia5c9dbc2df9f25ef521c9d001a1949c329aaaba3
Reviewed-on: https://chromium-review.googlesource.com/234678
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Kaiyen Chang <kaiyen.chang@intel.com>
Tested-by: Kaiyen Chang <kaiyen.chang@intel.com>
CHROMIUM: ACPI / fan: Make struct dev_pm_ops const

Silence the following checkpatch warning:
WARNING: struct dev_pm_ops should normally be const.

BUG=chrome-os-partner:28265
TEST=N/A

Change-Id: Ic2d23477943746419990f842a2dc74e759abf0fd
Signed-off-by: Kaiyen Chang <kaiyen.chang@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/236537
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Merge branch 'chromeos-3.8' of https://chromium.googlesource.com/chromiumos/third_party/kernel into chromeos-3.8