Lines Matching refs:lowbatt_handle
2609 static struct device_attribute *lowbatt_handle; variable
2645 lowbatt_handle = kzalloc(sizeof(struct device_attribute), GFP_KERNEL); in sony_nc_lowbatt_setup()
2646 if (!lowbatt_handle) in sony_nc_lowbatt_setup()
2649 sysfs_attr_init(&lowbatt_handle->attr); in sony_nc_lowbatt_setup()
2650 lowbatt_handle->attr.name = "lowbatt_hibernate"; in sony_nc_lowbatt_setup()
2651 lowbatt_handle->attr.mode = S_IRUGO | S_IWUSR; in sony_nc_lowbatt_setup()
2652 lowbatt_handle->show = sony_nc_lowbatt_show; in sony_nc_lowbatt_setup()
2653 lowbatt_handle->store = sony_nc_lowbatt_store; in sony_nc_lowbatt_setup()
2655 result = device_create_file(&pd->dev, lowbatt_handle); in sony_nc_lowbatt_setup()
2657 kfree(lowbatt_handle); in sony_nc_lowbatt_setup()
2658 lowbatt_handle = NULL; in sony_nc_lowbatt_setup()
2667 if (lowbatt_handle) { in sony_nc_lowbatt_cleanup()
2668 device_remove_file(&pd->dev, lowbatt_handle); in sony_nc_lowbatt_cleanup()
2669 kfree(lowbatt_handle); in sony_nc_lowbatt_cleanup()
2670 lowbatt_handle = NULL; in sony_nc_lowbatt_cleanup()