X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fatm%2Fsuni.c;h=b1d063cc4fbe0f6903359bf3328566e0e50aee93;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=e5a0f5cbdc21439aaf2ef2ce85ba6f6093e446d7;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/drivers/atm/suni.c b/drivers/atm/suni.c index e5a0f5cbd..b1d063cc4 100644 --- a/drivers/atm/suni.c +++ b/drivers/atm/suni.c @@ -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) ? @@ -196,7 +196,7 @@ static int suni_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg) case SONET_GETFRSENSE: return -EINVAL; case ATM_SETLOOP: - return set_loopback(dev,(int) (long) arg); + return set_loopback(dev,(int)(unsigned long)arg); case ATM_GETLOOP: return put_user(PRIV(dev)->loop_mode,(int __user *)arg) ? -EFAULT : 0;