| .. | .. |
|---|
| 112 | 112 | return usb4604_probe(hub); |
|---|
| 113 | 113 | } |
|---|
| 114 | 114 | |
|---|
| 115 | | -#ifdef CONFIG_PM_SLEEP |
|---|
| 116 | | -static int usb4604_i2c_suspend(struct device *dev) |
|---|
| 115 | +static int __maybe_unused usb4604_i2c_suspend(struct device *dev) |
|---|
| 117 | 116 | { |
|---|
| 118 | 117 | struct i2c_client *client = to_i2c_client(dev); |
|---|
| 119 | 118 | struct usb4604 *hub = i2c_get_clientdata(client); |
|---|
| .. | .. |
|---|
| 123 | 122 | return 0; |
|---|
| 124 | 123 | } |
|---|
| 125 | 124 | |
|---|
| 126 | | -static int usb4604_i2c_resume(struct device *dev) |
|---|
| 125 | +static int __maybe_unused usb4604_i2c_resume(struct device *dev) |
|---|
| 127 | 126 | { |
|---|
| 128 | 127 | struct i2c_client *client = to_i2c_client(dev); |
|---|
| 129 | 128 | struct usb4604 *hub = i2c_get_clientdata(client); |
|---|
| .. | .. |
|---|
| 132 | 131 | |
|---|
| 133 | 132 | return 0; |
|---|
| 134 | 133 | } |
|---|
| 135 | | -#endif |
|---|
| 136 | 134 | |
|---|
| 137 | 135 | static SIMPLE_DEV_PM_OPS(usb4604_i2c_pm_ops, usb4604_i2c_suspend, |
|---|
| 138 | 136 | usb4604_i2c_resume); |
|---|
| .. | .. |
|---|
| 154 | 152 | static struct i2c_driver usb4604_i2c_driver = { |
|---|
| 155 | 153 | .driver = { |
|---|
| 156 | 154 | .name = "usb4604", |
|---|
| 157 | | - .pm = &usb4604_i2c_pm_ops, |
|---|
| 155 | + .pm = pm_ptr(&usb4604_i2c_pm_ops), |
|---|
| 158 | 156 | .of_match_table = of_match_ptr(usb4604_of_match), |
|---|
| 159 | 157 | }, |
|---|
| 160 | 158 | .probe = usb4604_i2c_probe, |
|---|