mirror of
https://github.com/openharmony/drivers_adapter_khdf_linux.git
synced 2026-07-19 16:43:55 -04:00
!282 fix: modify the review problem of osal
Merge pull request !282 from Zhang/master
This commit is contained in:
@@ -26,12 +26,12 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
static inline size_t CopyToUser (void __user *to, const void *from, size_t len)
|
||||
static inline size_t CopyToUser(void __user *to, const void *from, size_t len)
|
||||
{
|
||||
return (size_t)copy_to_user(to, from, (unsigned long)len);
|
||||
}
|
||||
|
||||
static inline size_t CopyFromUser (void *to, const void __user *from, size_t len)
|
||||
static inline size_t CopyFromUser(void *to, const void __user *from, size_t len)
|
||||
{
|
||||
return (size_t)copy_from_user(to, from, (unsigned long)len);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ typedef enum {
|
||||
} OsalTimerMode;
|
||||
|
||||
struct osal_ktimer {
|
||||
unsigned long arg;
|
||||
uintptr_t arg;
|
||||
struct timer_list timer;
|
||||
OsalTimerFunc func;
|
||||
uint32_t msec;
|
||||
|
||||
@@ -166,7 +166,7 @@ bool HdfAddWork(HdfWorkQueue *queue, HdfWork *work)
|
||||
}
|
||||
EXPORT_SYMBOL(HdfAddWork);
|
||||
|
||||
bool HdfAddDelayedWork(HdfWorkQueue *queue, HdfWork *work, unsigned long ms)
|
||||
bool HdfAddDelayedWork(HdfWorkQueue *queue, HdfWork *work, uint32_t ms)
|
||||
{
|
||||
if (queue == NULL || queue->realWorkQueue == NULL || work == NULL || work->realWork == NULL) {
|
||||
HDF_LOGE("%s invalid para", __func__);
|
||||
@@ -174,7 +174,7 @@ bool HdfAddDelayedWork(HdfWorkQueue *queue, HdfWork *work, unsigned long ms)
|
||||
}
|
||||
|
||||
return queue_delayed_work(queue->realWorkQueue, &((struct WorkWrapper *)work->realWork)->work,
|
||||
msecs_to_jiffies(ms));
|
||||
msecs_to_jiffies((unsigned long)ms));
|
||||
}
|
||||
EXPORT_SYMBOL(HdfAddDelayedWork);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user