Lines Matching refs:sd_file

377 	struct sclp_sd_file *sd_file = to_sd_file(kobj);  in sclp_sd_file_release()  local
379 sclp_sd_data_reset(&sd_file->data); in sclp_sd_file_release()
380 kfree(sd_file); in sclp_sd_file_release()
393 static int sclp_sd_file_update(struct sclp_sd_file *sd_file) in sclp_sd_file_update() argument
395 const char *name = kobject_name(&sd_file->kobj); in sclp_sd_file_update()
399 rc = sclp_sd_store_data(&data, sd_file->di); in sclp_sd_file_update()
408 mutex_lock(&sd_file->data_mutex); in sclp_sd_file_update()
409 sclp_sd_data_reset(&sd_file->data); in sclp_sd_file_update()
410 sd_file->data = data; in sclp_sd_file_update()
411 mutex_unlock(&sd_file->data_mutex); in sclp_sd_file_update()
415 kobject_uevent(&sd_file->kobj, KOBJ_CHANGE); in sclp_sd_file_update()
427 struct sclp_sd_file *sd_file = data; in sclp_sd_file_update_async() local
429 sclp_sd_file_update(sd_file); in sclp_sd_file_update_async()
444 struct sclp_sd_file *sd_file = to_sd_file(kobj); in reload_store() local
446 sclp_sd_file_update(sd_file); in reload_store()
482 struct sclp_sd_file *sd_file = to_sd_file(kobj); in data_read() local
486 mutex_lock(&sd_file->data_mutex); in data_read()
488 data = sd_file->data.data; in data_read()
489 data_size = sd_file->data.dsize_bytes; in data_read()
498 mutex_unlock(&sd_file->data_mutex); in data_read()
521 struct sclp_sd_file *sd_file; in sclp_sd_file_create() local
524 sd_file = kzalloc(sizeof(*sd_file), GFP_KERNEL); in sclp_sd_file_create()
525 if (!sd_file) in sclp_sd_file_create()
527 sd_file->di = di; in sclp_sd_file_create()
528 mutex_init(&sd_file->data_mutex); in sclp_sd_file_create()
531 sd_file->kobj.kset = sclp_sd_kset; in sclp_sd_file_create()
532 rc = kobject_init_and_add(&sd_file->kobj, &sclp_sd_file_ktype, NULL, in sclp_sd_file_create()
535 kobject_put(&sd_file->kobj); in sclp_sd_file_create()
539 sysfs_bin_attr_init(&sd_file->data_attr); in sclp_sd_file_create()
540 sd_file->data_attr.attr.name = "data"; in sclp_sd_file_create()
541 sd_file->data_attr.attr.mode = 0444; in sclp_sd_file_create()
542 sd_file->data_attr.read = data_read; in sclp_sd_file_create()
544 rc = sysfs_create_bin_file(&sd_file->kobj, &sd_file->data_attr); in sclp_sd_file_create()
546 kobject_put(&sd_file->kobj); in sclp_sd_file_create()
554 kobject_uevent(&sd_file->kobj, KOBJ_ADD); in sclp_sd_file_create()
557 async_schedule(sclp_sd_file_update_async, sd_file); in sclp_sd_file_create()
559 return sd_file; in sclp_sd_file_create()