Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

uwb: Remove umc bus legacy suspend/resume support

There are currently no umc drivers implementing suspend/resume, so remove
the legacy suspend/resume support from the framework. If a umc driver ever
wants to implement suspend/resume they can use dev_pm_ops, which works out
of the box without any additional support necessary from the bus itself.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Lars-Peter Clausen and committed by
Greg Kroah-Hartman
c5b68807 f1f0b57d

-36
-34
drivers/uwb/umc-bus.c
··· 163 163 return 0; 164 164 } 165 165 166 - static int umc_device_suspend(struct device *dev, pm_message_t state) 167 - { 168 - struct umc_dev *umc; 169 - struct umc_driver *umc_driver; 170 - int err = 0; 171 - 172 - umc = to_umc_dev(dev); 173 - 174 - if (dev->driver) { 175 - umc_driver = to_umc_driver(dev->driver); 176 - if (umc_driver->suspend) 177 - err = umc_driver->suspend(umc, state); 178 - } 179 - return err; 180 - } 181 - 182 - static int umc_device_resume(struct device *dev) 183 - { 184 - struct umc_dev *umc; 185 - struct umc_driver *umc_driver; 186 - int err = 0; 187 - 188 - umc = to_umc_dev(dev); 189 - 190 - if (dev->driver) { 191 - umc_driver = to_umc_driver(dev->driver); 192 - if (umc_driver->resume) 193 - err = umc_driver->resume(umc); 194 - } 195 - return err; 196 - } 197 - 198 166 static ssize_t capability_id_show(struct device *dev, struct device_attribute *attr, char *buf) 199 167 { 200 168 struct umc_dev *umc = to_umc_dev(dev); ··· 191 223 .match = umc_bus_match, 192 224 .probe = umc_device_probe, 193 225 .remove = umc_device_remove, 194 - .suspend = umc_device_suspend, 195 - .resume = umc_device_resume, 196 226 .dev_groups = umc_dev_groups, 197 227 }; 198 228 EXPORT_SYMBOL_GPL(umc_bus_type);
-2
include/linux/uwb/umc.h
··· 87 87 88 88 int (*probe)(struct umc_dev *); 89 89 void (*remove)(struct umc_dev *); 90 - int (*suspend)(struct umc_dev *, pm_message_t state); 91 - int (*resume)(struct umc_dev *); 92 90 int (*pre_reset)(struct umc_dev *); 93 91 int (*post_reset)(struct umc_dev *); 94 92