]> err.no Git - linux-2.6/blobdiff - drivers/s390/net/netiucv.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[linux-2.6] / drivers / s390 / net / netiucv.c
index c358764f3264b56a478b88dce21f6ae94cc96e82..4d18d6419ddc016fd08560bdef7f46af58335b5b 100644 (file)
@@ -134,18 +134,6 @@ PRINT_##importance(header "%02x %02x %02x %02x  %02x %02x %02x %02x  " \
                   *(((char*)ptr)+28),*(((char*)ptr)+29), \
                   *(((char*)ptr)+30),*(((char*)ptr)+31));
 
-static inline void iucv_hex_dump(unsigned char *buf, size_t len)
-{
-       size_t i;
-
-       for (i = 0; i < len; i++) {
-               if (i && !(i % 16))
-                       printk("\n");
-               printk("%02x ", *(buf + i));
-       }
-       printk("\n");
-}
-
 #define PRINTK_HEADER " iucv: "       /* for debugging */
 
 static struct device_driver netiucv_driver = {
@@ -212,7 +200,7 @@ struct iucv_connection {
  */
 static struct list_head iucv_connection_list =
        LIST_HEAD_INIT(iucv_connection_list);
-static rwlock_t iucv_connection_rwlock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(iucv_connection_rwlock);
 
 /**
  * Representation of event-data for the
@@ -280,7 +268,7 @@ static u8 iucvMagic[16] = {
  *
  * @returns The printable string (static data!!)
  */
-static inline char *netiucv_printname(char *name)
+static char *netiucv_printname(char *name)
 {
        static char tmp[9];
        char *p = tmp;
@@ -765,7 +753,7 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg)
 
        header.next = 0;
        memcpy(skb_put(conn->tx_buff, NETIUCV_HDRLEN), &header, NETIUCV_HDRLEN);
-       conn->prof.send_stamp = xtime;
+       conn->prof.send_stamp = current_kernel_time();
        txmsg.class = 0;
        txmsg.tag = 0;
        rc = iucv_message_send(conn->path, &txmsg, 0, 0,
@@ -1197,7 +1185,7 @@ static int netiucv_transmit_skb(struct iucv_connection *conn,
                memcpy(skb_put(nskb, NETIUCV_HDRLEN), &header,  NETIUCV_HDRLEN);
 
                fsm_newstate(conn->fsm, CONN_STATE_TX);
-               conn->prof.send_stamp = xtime;
+               conn->prof.send_stamp = current_kernel_time();
 
                msg.tag = 1;
                msg.class = 0;
@@ -1315,7 +1303,8 @@ static int netiucv_tx(struct sk_buff *skb, struct net_device *dev)
         * and throw away packet.
         */
        if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) {
-               fsm_event(privptr->fsm, DEV_EVENT_START, dev);
+               if (!in_atomic())
+                       fsm_event(privptr->fsm, DEV_EVENT_START, dev);
                dev_kfree_skb(skb);
                privptr->stats.tx_dropped++;
                privptr->stats.tx_errors++;
@@ -1729,7 +1718,7 @@ static struct attribute_group netiucv_stat_attr_group = {
        .attrs = netiucv_stat_attrs,
 };
 
-static inline int netiucv_add_files(struct device *dev)
+static int netiucv_add_files(struct device *dev)
 {
        int ret;
 
@@ -1743,7 +1732,7 @@ static inline int netiucv_add_files(struct device *dev)
        return ret;
 }
 
-static inline void netiucv_remove_files(struct device *dev)
+static void netiucv_remove_files(struct device *dev)
 {
        IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
        sysfs_remove_group(&dev->kobj, &netiucv_stat_attr_group);
@@ -1915,7 +1904,6 @@ static void netiucv_setup_netdevice(struct net_device *dev)
        dev->type                = ARPHRD_SLIP;
        dev->tx_queue_len        = NETIUCV_QUEUELEN_DEFAULT;
        dev->flags               = IFF_POINTOPOINT | IFF_NOARP;
-       SET_MODULE_OWNER(dev);
 }
 
 /**