]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: unisys: finddevice() doesn't need to be inline
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 5 May 2015 22:35:54 +0000 (18:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2015 13:25:56 +0000 (15:25 +0200)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorchipset/visorchipset.h
drivers/staging/unisys/visorchipset/visorchipset_main.c

index 59552afc663f806ed1215d58d4cf5b7f706daa9d..a3fe8b7de341de95836cc685ccc8484fbd613159 100644 (file)
@@ -91,18 +91,6 @@ struct visorchipset_device_info {
        void *bus_driver_context;
 };
 
-static inline struct visorchipset_device_info *finddevice(
-               struct list_head *list, u32 bus_no, u32 dev_no)
-{
-       struct visorchipset_device_info *p;
-
-       list_for_each_entry(p, list, entry) {
-               if (p->bus_no == bus_no && p->dev_no == dev_no)
-                       return p;
-       }
-       return NULL;
-}
-
 static inline void delbusdevices(struct list_head *list, u32 bus_no)
 {
        struct visorchipset_device_info *p, *tmp;
index f6475673616486197f98465aebcc8f24cedebc0d..d1f0d18da10e6262eff96e49008e30dd6041baf7 100644 (file)
@@ -539,6 +539,19 @@ bus_find(struct list_head *list, u32 bus_no)
        return NULL;
 }
 
+static struct visorchipset_device_info *
+device_find(struct list_head *list, u32 bus_no, u32 dev_no)
+{
+       struct visorchipset_device_info *p;
+
+       list_for_each_entry(p, list, entry) {
+               if (p->bus_no == bus_no && p->dev_no == dev_no)
+                       return p;
+       }
+
+       return NULL;
+}
+
 static u8
 check_chipset_events(void)
 {
@@ -825,7 +838,7 @@ device_changestate_responder(enum controlvm_id cmd_id,
        struct visorchipset_device_info *p;
        struct controlvm_message outmsg;
 
-       p = finddevice(&dev_info_list, bus_no, dev_no);
+       p = device_find(&dev_info_list, bus_no, dev_no);
        if (!p)
                return;
        if (p->pending_msg_hdr.id == CONTROLVM_INVALID)
@@ -852,7 +865,7 @@ device_responder(enum controlvm_id cmd_id, u32 bus_no, u32 dev_no, int response)
        struct visorchipset_device_info *p;
        bool need_clear = false;
 
-       p = finddevice(&dev_info_list, bus_no, dev_no);
+       p = device_find(&dev_info_list, bus_no, dev_no);
        if (!p)
                return;
        if (response >= 0) {
@@ -951,7 +964,7 @@ device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd,
        bool notified = false;
 
        struct visorchipset_device_info *dev_info =
-               finddevice(&dev_info_list, bus_no, dev_no);
+               device_find(&dev_info_list, bus_no, dev_no);
        char *envp[] = {
                "SPARSP_DIAGPOOL_PAUSED_STATE = 1",
                NULL
@@ -1157,7 +1170,7 @@ my_device_create(struct controlvm_message *inmsg)
        struct visorchipset_bus_info *bus_info;
        int rc = CONTROLVM_RESP_SUCCESS;
 
-       dev_info = finddevice(&dev_info_list, bus_no, dev_no);
+       dev_info = device_find(&dev_info_list, bus_no, dev_no);
        if (dev_info && (dev_info->state.created == 1)) {
                POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
                                 POSTCODE_SEVERITY_ERR);
@@ -1227,7 +1240,7 @@ my_device_changestate(struct controlvm_message *inmsg)
        struct visorchipset_device_info *dev_info;
        int rc = CONTROLVM_RESP_SUCCESS;
 
-       dev_info = finddevice(&dev_info_list, bus_no, dev_no);
+       dev_info = device_find(&dev_info_list, bus_no, dev_no);
        if (!dev_info) {
                POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no,
                                 POSTCODE_SEVERITY_ERR);
@@ -1254,7 +1267,7 @@ my_device_destroy(struct controlvm_message *inmsg)
        struct visorchipset_device_info *dev_info;
        int rc = CONTROLVM_RESP_SUCCESS;
 
-       dev_info = finddevice(&dev_info_list, bus_no, dev_no);
+       dev_info = device_find(&dev_info_list, bus_no, dev_no);
        if (!dev_info)
                rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
        else if (dev_info->state.created == 0)
@@ -2033,7 +2046,7 @@ bool
 visorchipset_get_device_info(u32 bus_no, u32 dev_no,
                             struct visorchipset_device_info *dev_info)
 {
-       void *p = finddevice(&dev_info_list, bus_no, dev_no);
+       void *p = device_find(&dev_info_list, bus_no, dev_no);
 
        if (!p)
                return false;
@@ -2045,8 +2058,9 @@ EXPORT_SYMBOL_GPL(visorchipset_get_device_info);
 bool
 visorchipset_set_device_context(u32 bus_no, u32 dev_no, void *context)
 {
-       struct visorchipset_device_info *p =
-                       finddevice(&dev_info_list, bus_no, dev_no);
+       struct visorchipset_device_info *p;
+
+       p = device_find(&dev_info_list, bus_no, dev_no);
 
        if (!p)
                return false;