From: Roberta Dobrescu Date: Fri, 26 Sep 2014 20:58:39 +0000 (+0300) Subject: staging: dgnc: dgnc_driver.c: Replace non-standard spinlock's macros X-Git-Tag: fixes-for-v3.18-merge-window~15^2~157 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66663dc1032e03fa2e24fae80e84d71bb99fbedb;p=pandora-kernel.git staging: dgnc: dgnc_driver.c: Replace non-standard spinlock's macros This patch replaces non-standard spinlock's macros. It is done using coccinelle and the following semantic patch: @@ expression x; @@ - DGNC_SPINLOCK_INIT(x) + spin_lock_init(&x) @@ expression x, y; @@ - DGNC_LOCK(x, y) + spin_lock_irqsave(&x, y) @@ expression x, y; @@ - DGNC_UNLOCK(x, y) + spin_unlock_irqrestore(&x, y) @used_by_lock exists@ typedef ulong; symbol lock_flags; position p1, p2; @@ ( ulong lock_flags@p1; | unsigned long lock_flags@p2; ) ... ( spin_lock_irqsave(..., lock_flags) | spin_unlock_irqrestore(..., lock_flags) ) @@ position used_by_lock.p1, used_by_lock.p2; @@ ( - ulong lock_flags@p1; + unsigned long flags; | - unsigned long lock_flags@p2; + unsigned long flags; ) <... - lock_flags + flags ...> Signed-off-by: Roberta Dobrescu Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed