aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/max3100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/max3100.c')
-rw-r--r--drivers/tty/serial/max3100.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index 32517d4bceab..57da9bbaaab5 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/serial/max3100.c
@@ -849,11 +849,11 @@ static int max3100_remove(struct spi_device *spi)
849 return 0; 849 return 0;
850} 850}
851 851
852#ifdef CONFIG_PM 852#ifdef CONFIG_PM_SLEEP
853 853
854static int max3100_suspend(struct spi_device *spi, pm_message_t state) 854static int max3100_suspend(struct device *dev)
855{ 855{
856 struct max3100_port *s = dev_get_drvdata(&spi->dev); 856 struct max3100_port *s = dev_get_drvdata(dev);
857 857
858 dev_dbg(&s->spi->dev, "%s\n", __func__); 858 dev_dbg(&s->spi->dev, "%s\n", __func__);
859 859
@@ -874,9 +874,9 @@ static int max3100_suspend(struct spi_device *spi, pm_message_t state)
874 return 0; 874 return 0;
875} 875}
876 876
877static int max3100_resume(struct spi_device *spi) 877static int max3100_resume(struct device *dev)
878{ 878{
879 struct max3100_port *s = dev_get_drvdata(&spi->dev); 879 struct max3100_port *s = dev_get_drvdata(dev);
880 880
881 dev_dbg(&s->spi->dev, "%s\n", __func__); 881 dev_dbg(&s->spi->dev, "%s\n", __func__);
882 882
@@ -894,21 +894,21 @@ static int max3100_resume(struct spi_device *spi)
894 return 0; 894 return 0;
895} 895}
896 896
897static SIMPLE_DEV_PM_OPS(max3100_pm_ops, max3100_suspend, max3100_resume);
898#define MAX3100_PM_OPS (&max3100_pm_ops)
899
897#else 900#else
898#define max3100_suspend NULL 901#define MAX3100_PM_OPS NULL
899#define max3100_resume NULL
900#endif 902#endif
901 903
902static struct spi_driver max3100_driver = { 904static struct spi_driver max3100_driver = {
903 .driver = { 905 .driver = {
904 .name = "max3100", 906 .name = "max3100",
905 .owner = THIS_MODULE, 907 .owner = THIS_MODULE,
908 .pm = MAX3100_PM_OPS,
906 }, 909 },
907
908 .probe = max3100_probe, 910 .probe = max3100_probe,
909 .remove = max3100_remove, 911 .remove = max3100_remove,
910 .suspend = max3100_suspend,
911 .resume = max3100_resume,
912}; 912};
913 913
914module_spi_driver(max3100_driver); 914module_spi_driver(max3100_driver);