driver-core: constify data for class_find_device()

All in-kernel users of class_find_device() don't really need mutable
data for match callback.

In two places (kernel/power/suspend_test.c, drivers/scsi/osd/osd_uld.c)
this patch changes match callbacks to use const search data.

The const is propagated to rtc_class_open() and power_supply_get_by_name()
parameters.

Note that there's a dev reference leak in suspend_test.c that's not
touched in this patch.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9f3b795a626ee79574595e06d1437fe0c7d51d29)
Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
TTY: mark tty_get_device call with the proper const values

Michał's previous patch missed this tty check to fix up the
class_find_device() arguments.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6e9430ac57e8c1f41ab24ef7fbb3d452c7eb7246)
Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
pwm: Add sysfs interface

Add a simple sysfs interface to the generic PWM framework.

  /sys/class/pwm/
  `-- pwmchipN/           for each PWM chip
      |-- export          (w/o) ask the kernel to export a PWM channel
      |-- npwm            (r/o) number of PWM channels in this PWM chip
      |-- pwmX/           for each exported PWM channel
      |   |-- duty_cycle  (r/w) duty cycle (in nanoseconds)
      |   |-- enable      (r/w) enable/disable PWM
      |   |-- period      (r/w) period (in nanoseconds)
      |   `-- polarity    (r/w) polarity of PWM (normal/inversed)
      `-- unexport        (w/o) return a PWM channel to the kernel

Based on work by Lars Poeschel.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Lars Poeschel <poeschel@lemonage.de>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Rob Landley <rob@landley.net>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 76abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d)
Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
drivers/pwm/sysfs.c: add export.h - RTC #50404

Resolve THIS_MODULE macro.
(cherry picked from commit b594e3ef2c9f7a2c61188e76a1c228f1d30556eb)

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
core Quark patch

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark Platform Code

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark UART

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
EFI capsule update

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark SDIO host controller

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark USB host

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
USB gadget serial

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark stmmac Ethernet

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark GPIO 2/2

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark GPIO 1/2

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark GIP + Cypress I/O expander

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark I2C

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark sensors

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark SC SPI

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark IIO

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>
Quark SPI flash

Signed-off-by: Matteo Croce <matteo.croce@fluidmesh.com>