All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
To: linux-renesas-soc@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com, magnus.damm@gmail.com,
	Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Subject: [PATCH 6/7] drm/img-rogue: init_timer() -> setup_timer()
Date: Fri, 15 Dec 2017 16:15:44 +0100	[thread overview]
Message-ID: <1513350945-2642-7-git-send-email-ulrich.hecht+renesas@gmail.com> (raw)
In-Reply-To: <1513350945-2642-1-git-send-email-ulrich.hecht+renesas@gmail.com>

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 services/server/env/linux/osfunc.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/services/server/env/linux/osfunc.c b/services/server/env/linux/osfunc.c
index c222095..b529c63 100644
--- a/services/server/env/linux/osfunc.c
+++ b/services/server/env/linux/osfunc.c
@@ -492,7 +492,7 @@ static inline IMG_UINT64 KClockns64(void)
 {
 	ktime_t sTime = ktime_get();
 
-	return sTime.tv64;
+	return sTime;
 }
 
 PVRSRV_ERROR OSClockMonotonicns64(IMG_UINT64 *pui64Time)
@@ -1135,9 +1135,9 @@ static void OSTimerCallbackBody(TIMER_CALLBACK_DATA *psTimerCBData)
 @Description    OS specific timer callback wrapper function
 @Input          uData    Timer callback data
 */ /**************************************************************************/
-static void OSTimerCallbackWrapper(uintptr_t uData)
+static void OSTimerCallbackWrapper(struct timer_list *t)
 {
-	TIMER_CALLBACK_DATA	*psTimerCBData = (TIMER_CALLBACK_DATA*)uData;
+	TIMER_CALLBACK_DATA *psTimerCBData = from_timer(psTimerCBData, t, sTimer);
 
 #if defined(PVR_LINUX_TIMERS_USING_WORKQUEUES) || defined(PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE)
 	int res;
@@ -1219,12 +1219,8 @@ IMG_HANDLE OSAddTimer(PFN_TIMER_FUNC pfnTimerFunc, void *pvData, IMG_UINT32 ui32
 	psTimerCBData->ui32Delay = ((HZ * ui32MsTimeout) < 1000)
 								?	1
 								:	((HZ * ui32MsTimeout) / 1000);
-	/* initialise object */
-	init_timer(&psTimerCBData->sTimer);
-
 	/* setup timer object */
-	psTimerCBData->sTimer.function = (void *)OSTimerCallbackWrapper;
-	psTimerCBData->sTimer.data = (uintptr_t)psTimerCBData;
+	timer_setup(&psTimerCBData->sTimer, OSTimerCallbackWrapper, 0);
 
 	return (IMG_HANDLE)(uintptr_t)(ui32i + 1);
 }
-- 
2.7.4

  parent reply	other threads:[~2017-12-15 15:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 15:15 [PATCH 0/7] up-port of out-of-tree GSX GPU driver for r8a7796 Ulrich Hecht
2017-12-15 15:15 ` [PATCH 1/7] drm/img-rogue: adapt to changed fence API Ulrich Hecht
2017-12-15 15:15 ` [PATCH 2/7] drm/img-rogue: change #include <asm/uaccess.h> to <linux/uaccess.h> Ulrich Hecht
2017-12-15 15:15 ` [PATCH 3/7] drm/img-rogue: #include <linux/sched/clock.h> in osfunc.c Ulrich Hecht
2017-12-15 15:15 ` [PATCH 4/7] drm/img-rogue: dma_buf_ops .kmap_* are now .map_* Ulrich Hecht
2017-12-15 15:15 ` [PATCH 5/7] drm/img-rogue: dma_ops->sync_single_for_*() -> dma_sync_single_for_*() Ulrich Hecht
2017-12-15 15:15 ` Ulrich Hecht [this message]
2017-12-15 15:15 ` [PATCH 7/7] drm/img-rogue: replace call to obsolete drm_platform_init() Ulrich Hecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1513350945-2642-7-git-send-email-ulrich.hecht+renesas@gmail.com \
    --to=ulrich.hecht+renesas@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.