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

s390/monwriter: Remove power management support

Power management support was removed for s390 with
commit 394216275c7d ("s390: remove broken hibernate / power management
support").

Remove leftover monwriter-related power management code.

Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

authored by

Peter Oberparleiter and committed by
Vasily Gorbik
21adcf11 8e1eaf4d

+1 -89
+1 -89
drivers/s390/char/monwriter.c
··· 20 20 #include <linux/ctype.h> 21 21 #include <linux/poll.h> 22 22 #include <linux/mutex.h> 23 - #include <linux/platform_device.h> 24 23 #include <linux/slab.h> 25 24 #include <linux/uaccess.h> 26 25 #include <asm/ebcdic.h> ··· 39 40 char *data; 40 41 }; 41 42 42 - static LIST_HEAD(mon_priv_list); 43 - 44 43 struct mon_private { 45 - struct list_head priv_list; 46 44 struct list_head list; 47 45 struct monwrite_hdr hdr; 48 46 size_t hdr_to_read; ··· 195 199 monpriv->hdr_to_read = sizeof(monpriv->hdr); 196 200 mutex_init(&monpriv->thread_mutex); 197 201 filp->private_data = monpriv; 198 - list_add_tail(&monpriv->priv_list, &mon_priv_list); 199 202 return nonseekable_open(inode, filp); 200 203 } 201 204 ··· 212 217 kfree(entry->data); 213 218 kfree(entry); 214 219 } 215 - list_del(&monpriv->priv_list); 216 220 kfree(monpriv); 217 221 return 0; 218 222 } ··· 288 294 }; 289 295 290 296 /* 291 - * suspend/resume 292 - */ 293 - 294 - static int monwriter_freeze(struct device *dev) 295 - { 296 - struct mon_private *monpriv; 297 - struct mon_buf *monbuf; 298 - 299 - list_for_each_entry(monpriv, &mon_priv_list, priv_list) { 300 - list_for_each_entry(monbuf, &monpriv->list, list) { 301 - if (monbuf->hdr.mon_function != MONWRITE_GEN_EVENT) 302 - monwrite_diag(&monbuf->hdr, monbuf->data, 303 - APPLDATA_STOP_REC); 304 - } 305 - } 306 - return 0; 307 - } 308 - 309 - static int monwriter_restore(struct device *dev) 310 - { 311 - struct mon_private *monpriv; 312 - struct mon_buf *monbuf; 313 - 314 - list_for_each_entry(monpriv, &mon_priv_list, priv_list) { 315 - list_for_each_entry(monbuf, &monpriv->list, list) { 316 - if (monbuf->hdr.mon_function == MONWRITE_START_INTERVAL) 317 - monwrite_diag(&monbuf->hdr, monbuf->data, 318 - APPLDATA_START_INTERVAL_REC); 319 - if (monbuf->hdr.mon_function == MONWRITE_START_CONFIG) 320 - monwrite_diag(&monbuf->hdr, monbuf->data, 321 - APPLDATA_START_CONFIG_REC); 322 - } 323 - } 324 - return 0; 325 - } 326 - 327 - static int monwriter_thaw(struct device *dev) 328 - { 329 - return monwriter_restore(dev); 330 - } 331 - 332 - static const struct dev_pm_ops monwriter_pm_ops = { 333 - .freeze = monwriter_freeze, 334 - .thaw = monwriter_thaw, 335 - .restore = monwriter_restore, 336 - }; 337 - 338 - static struct platform_driver monwriter_pdrv = { 339 - .driver = { 340 - .name = "monwriter", 341 - .pm = &monwriter_pm_ops, 342 - }, 343 - }; 344 - 345 - static struct platform_device *monwriter_pdev; 346 - 347 - /* 348 297 * module init/exit 349 298 */ 350 299 351 300 static int __init mon_init(void) 352 301 { 353 - int rc; 354 - 355 302 if (!MACHINE_IS_VM) 356 303 return -ENODEV; 357 - 358 - rc = platform_driver_register(&monwriter_pdrv); 359 - if (rc) 360 - return rc; 361 - 362 - monwriter_pdev = platform_device_register_simple("monwriter", -1, NULL, 363 - 0); 364 - if (IS_ERR(monwriter_pdev)) { 365 - rc = PTR_ERR(monwriter_pdev); 366 - goto out_driver; 367 - } 368 - 369 304 /* 370 305 * misc_register() has to be the last action in module_init(), because 371 306 * file operations will be available right after this. 372 307 */ 373 - rc = misc_register(&mon_dev); 374 - if (rc) 375 - goto out_device; 376 - return 0; 377 - 378 - out_device: 379 - platform_device_unregister(monwriter_pdev); 380 - out_driver: 381 - platform_driver_unregister(&monwriter_pdrv); 382 - return rc; 308 + return misc_register(&mon_dev); 383 309 } 384 310 385 311 static void __exit mon_exit(void) 386 312 { 387 313 misc_deregister(&mon_dev); 388 - platform_device_unregister(monwriter_pdev); 389 - platform_driver_unregister(&monwriter_pdrv); 390 314 } 391 315 392 316 module_init(mon_init);