static void cmos_platform_shutdown(struct platform_device *pdev) { if (system_state == SYSTEM_POWER_OFF && !cmos_poweroff(&pdev->dev)) return; cmos_do_shutdown(); }
static void cmos_pnp_shutdown(struct device *pdev) { if (system_state == SYSTEM_POWER_OFF && !cmos_poweroff(pdev)) return; cmos_do_shutdown(); }
static void cmos_pnp_shutdown(struct pnp_dev *pnp) { if (system_state == SYSTEM_POWER_OFF && !cmos_poweroff(&pnp->dev)) return; cmos_do_shutdown(); }
static void __exit cmos_do_remove(struct device *dev) { struct cmos_rtc *cmos = dev_get_drvdata(dev); struct resource *ports; cmos_do_shutdown(cmos->irq); sysfs_remove_bin_file(&dev->kobj, &nvram); if (is_valid_irq(cmos->irq)) { free_irq(cmos->irq, cmos->rtc); hpet_unregister_irq_handler(cmos_interrupt); } rtc_device_unregister(cmos->rtc); cmos->rtc = NULL; ports = cmos->iomem; if (RTC_IOMAPPED) release_region(ports->start, resource_size(ports)); else release_mem_region(ports->start, resource_size(ports)); cmos->iomem = NULL; cmos->dev = NULL; }
static void cmos_platform_shutdown(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct cmos_rtc *cmos = dev_get_drvdata(dev); if (system_state == SYSTEM_POWER_OFF && !cmos_poweroff(dev)) return; cmos_do_shutdown(cmos->irq); }
static void cmos_pnp_shutdown(struct pnp_dev *pnp) { struct device *dev = &pnp->dev; struct cmos_rtc *cmos = dev_get_drvdata(dev); if (system_state == SYSTEM_POWER_OFF) { int retval = cmos_poweroff(dev); if (cmos_aie_poweroff(dev) < 0 && !retval) return; } cmos_do_shutdown(cmos->irq); }
static void __exit cmos_do_remove(struct device *dev) { struct cmos_rtc *cmos = dev_get_drvdata(dev); cmos_do_shutdown(); if (is_pnpacpi()) release_resource(cmos->iomem); rename_region(cmos->iomem, NULL); if (is_valid_irq(cmos->irq)) free_irq(cmos->irq, &cmos_rtc.rtc->class_dev); rtc_device_unregister(cmos_rtc.rtc); cmos_rtc.dev = NULL; dev_set_drvdata(dev, NULL); }
static void __exit cmos_do_remove(struct device *dev) { struct cmos_rtc *cmos = dev_get_drvdata(dev); struct resource *ports; cmos_do_shutdown(); sysfs_remove_bin_file(&dev->kobj, &nvram); if (is_valid_irq(cmos->irq)) { free_irq(cmos->irq, &cmos->rtc->class_dev); } rtc_device_unregister(cmos->rtc); cmos->rtc = NULL; ports = cmos->iomem; release_region(ports->start, ports->end + 1 - ports->start); cmos->iomem = NULL; cmos->dev = NULL; dev_set_drvdata(dev, NULL); }
static void cmos_platform_shutdown(struct platform_device *pdev) { cmos_do_shutdown(); }
static void cmos_pnp_shutdown(struct device *pdev) { cmos_do_shutdown(); }