drivers/timers, sched/clock: use file_get/file_put

fs_getfilep()/fs_putfilep() were renamed to file_get()/file_put().

The PTP clock paths still used the old names, breaking the PTP_CLOCK build.

Signed-off-by: raiden00pl <raiden00@railab.me>
This commit is contained in:
raiden00pl 2026-06-16 17:04:19 +02:00 committed by Matteo Golin
parent 5e2ce6190d
commit 30c5040547
5 changed files with 7 additions and 6 deletions

View file

@ -28,6 +28,7 @@
#include <errno.h>
#include <nuttx/debug.h>
#include <nuttx/fs/fs.h>
#include <nuttx/kmalloc.h>
#include <nuttx/mutex.h>
#include <nuttx/timers/ptp_clock.h>
@ -378,7 +379,7 @@ int ptp_clockid_to_filep(clockid_t clock_id, FAR struct file **filep)
ret = clock_id >> CLOCK_SHIFT;
if (ret >= 0)
{
ret = fs_getfilep(ret, filep);
ret = file_get(ret, filep);
}
if (ret < 0)
@ -389,7 +390,7 @@ int ptp_clockid_to_filep(clockid_t clock_id, FAR struct file **filep)
ops = (*filep)->f_inode->u.i_ops;
if (ops != &g_ptp_clock_file_ops)
{
fs_putfilep(*filep);
file_put(*filep);
return -EINVAL;
}

View file

@ -261,7 +261,7 @@ int nxclock_adjtime(clockid_t clock_id, FAR struct timex *buf)
ret = file_ioctl(filep, PTP_CLOCK_ADJTIME,
(unsigned long)(uintptr_t)buf);
fs_putfilep(filep);
file_put(filep);
}
#endif

View file

@ -87,7 +87,7 @@ int clock_getres(clockid_t clock_id, struct timespec *res)
}
ret = file_ioctl(filep, PTP_CLOCK_GETRES, res);
fs_putfilep(filep);
file_put(filep);
}
break;
#endif

View file

@ -145,7 +145,7 @@ int nxclock_gettime(clockid_t clock_id, FAR struct timespec *tp)
}
ret = file_ioctl(filep, PTP_CLOCK_GETTIME, tp);
fs_putfilep(filep);
file_put(filep);
}
#endif
else

View file

@ -160,7 +160,7 @@ int clock_settime(clockid_t clock_id, FAR const struct timespec *tp)
if (ret >= 0)
{
ret = file_ioctl(filep, PTP_CLOCK_SETTIME, tp);
fs_putfilep(filep);
file_put(filep);
}
}
#endif