diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-04 22:15:15 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-04 22:15:15 -0800 |
commit | 8e483ed1342a4ea45b70f0f33ac54eff7a33d918 (patch) | |
tree | 66c9f9ad196581966bdb06802e11e9856b1c0779 /drivers/w1/masters/w1-gpio.c | |
parent | e880e87488d5bbf630dd716e6de8a53585614568 (diff) | |
parent | e2d8680741edec84f843f783a7f4a44418b818d7 (diff) | |
download | linux-8e483ed1342a4ea45b70f0f33ac54eff7a33d918.tar.gz |
Merge tag 'char-misc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here is the big char/misc driver update for 4.4-rc1. Lots of
different driver and subsystem updates, hwtracing being the largest
with the addition of some new platforms that are now supported. Full
details in the shortlog.
All of these have been in linux-next for a long time with no reported
issues"
* tag 'char-misc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (181 commits)
fpga: socfpga: Fix check of return value of devm_request_irq
lkdtm: fix ACCESS_USERSPACE test
mcb: Destroy IDA on module unload
mcb: Do not return zero on error path in mcb_pci_probe()
mei: bus: set the device name before running fixup
mei: bus: use correct lock ordering
mei: Fix debugfs filename in error output
char: ipmi: ipmi_ssif: Replace timeval with timespec64
fpga: zynq-fpga: Fix issue with drvdata being overwritten.
fpga manager: remove unnecessary null pointer checks
fpga manager: ensure lifetime with of_fpga_mgr_get
fpga: zynq-fpga: Change fw format to handle bin instead of bit.
fpga: zynq-fpga: Fix unbalanced clock handling
misc: sram: partition base address belongs to __iomem space
coresight: etm3x: adding documentation for sysFS's cpu interface
vme: 8-bit status/id takes 256 values, not 255
fpga manager: Adding FPGA Manager support for Xilinx Zynq 7000
ARM: zynq: dt: Updated devicetree for Zynq 7000 platform.
ARM: dt: fpga: Added binding docs for Xilinx Zynq FPGA manager.
ver_linux: proc/modules, limit text processing to 'sed'
...
Diffstat (limited to 'drivers/w1/masters/w1-gpio.c')
-rw-r--r-- | drivers/w1/masters/w1-gpio.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index 8f7848c62811..a373ae69d9f6 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -198,11 +198,9 @@ static int w1_gpio_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM - -static int w1_gpio_suspend(struct platform_device *pdev, pm_message_t state) +static int __maybe_unused w1_gpio_suspend(struct device *dev) { - struct w1_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev); + struct w1_gpio_platform_data *pdata = dev_get_platdata(dev); if (pdata->enable_external_pullup) pdata->enable_external_pullup(0); @@ -210,9 +208,9 @@ static int w1_gpio_suspend(struct platform_device *pdev, pm_message_t state) return 0; } -static int w1_gpio_resume(struct platform_device *pdev) +static int __maybe_unused w1_gpio_resume(struct device *dev) { - struct w1_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev); + struct w1_gpio_platform_data *pdata = dev_get_platdata(dev); if (pdata->enable_external_pullup) pdata->enable_external_pullup(1); @@ -220,20 +218,16 @@ static int w1_gpio_resume(struct platform_device *pdev) return 0; } -#else -#define w1_gpio_suspend NULL -#define w1_gpio_resume NULL -#endif +static SIMPLE_DEV_PM_OPS(w1_gpio_pm_ops, w1_gpio_suspend, w1_gpio_resume); static struct platform_driver w1_gpio_driver = { .driver = { .name = "w1-gpio", + .pm = &w1_gpio_pm_ops, .of_match_table = of_match_ptr(w1_gpio_dt_ids), }, .probe = w1_gpio_probe, - .remove = w1_gpio_remove, - .suspend = w1_gpio_suspend, - .resume = w1_gpio_resume, + .remove = w1_gpio_remove, }; module_platform_driver(w1_gpio_driver); |