mirror of
https://github.com/SCST-project/scst.git
synced 2026-09-28 10:45:39 +00:00
scst: Port DEFINE_TIMER() instances to kernel v4.15
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7361 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <linux/blkdev.h> /* struct request_queue */
|
||||
#include <linux/scatterlist.h> /* struct scatterlist */
|
||||
#include <linux/slab.h> /* kmalloc() */
|
||||
#include <linux/timer.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/writeback.h> /* sync_page_range() */
|
||||
#include <scsi/scsi_cmnd.h> /* struct scsi_cmnd */
|
||||
@@ -703,6 +704,13 @@ struct t10_pi_tuple {
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
/* See also commit 1d27e3e2252b ("timer: Remove expires and data arguments from DEFINE_TIMER") */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
#undef DEFINE_TIMER
|
||||
#define DEFINE_TIMER(_name, _function) \
|
||||
struct timer_list _name = __TIMER_INITIALIZER(_function, 0, 0, 0)
|
||||
#endif
|
||||
|
||||
/* <linux/types.h> */
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
|
||||
|
||||
Reference in New Issue
Block a user