Source
247
247
|| put_user(pending, &ewp->pending)) return -EFAULT;
248
248
249
249
convert_from_efi_time(&eft, &wtime);
250
250
251
251
return copy_to_user(&ewp->time, &wtime,
252
252
sizeof(struct rtc_time)) ? -EFAULT : 0;
253
253
}
254
254
return -ENOTTY;
255
255
}
256
256
257
-
/*
258
-
* We enforce only one user at a time here with the open/close.
259
-
* Also clear the previous interrupt data on an open, and clean
260
-
* up things on a close.
261
-
*/
262
-
263
-
static int efi_rtc_open(struct inode *inode, struct file *file)
264
-
{
265
-
/*
266
-
* nothing special to do here
267
-
* We do accept multiple open files at the same time as we
268
-
* synchronize on the per call operation.
269
-
*/
270
-
return 0;
271
-
}
272
-
273
-
static int efi_rtc_close(struct inode *inode, struct file *file)
274
-
{
275
-
return 0;
276
-
}
277
-
278
257
/*
279
258
* The various file operations we support.
280
259
*/
281
260
282
261
static const struct file_operations efi_rtc_fops = {
283
262
.owner = THIS_MODULE,
284
263
.unlocked_ioctl = efi_rtc_ioctl,
285
-
.open = efi_rtc_open,
286
-
.release = efi_rtc_close,
287
264
.llseek = no_llseek,
288
265
};
289
266
290
267
static struct miscdevice efi_rtc_dev= {
291
268
EFI_RTC_MINOR,
292
269
"efirtc",
293
270
&efi_rtc_fops
294
271
};
295
272
296
273
/*