Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / atm / suni.c
index 678df94..b1d063c 100644 (file)
@@ -48,7 +48,7 @@ struct suni_priv {
 
 static struct timer_list poll_timer;
 static struct suni_priv *sunis = NULL;
-static spinlock_t sunis_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sunis_lock);
 
 
 #define ADD_LIMITED(s,v) \
@@ -188,7 +188,7 @@ static int suni_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg)
                case SONET_GETDIAG:
                        return get_diag(dev,arg);
                case SONET_SETFRAMING:
-                       if (arg != SONET_FRAME_SONET) return -EINVAL;
+                       if ((int)(unsigned long)arg != SONET_FRAME_SONET) return -EINVAL;
                        return 0;
                case SONET_GETFRAMING:
                        return put_user(SONET_FRAME_SONET,(int __user *)arg) ?