greybus: core: remove uevent handling for gb_connection
authorGreg Kroah-Hartman <gregkh@google.com>
Fri, 16 Oct 2015 23:53:46 +0000 (16:53 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 19 Oct 2015 19:09:10 +0000 (12:09 -0700)
As we are going to be removing the struct device from gb_connection,
there is no need to do anything for uevents for them.  So just remove
the code.  It wasn't doing anything anyway, so no functionality is lost
here at all.

As is_gb_connection() is no longer used, that is also removed in this
patch.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
drivers/staging/greybus/core.c
drivers/staging/greybus/greybus.h

index ea23aaff946509d3f79cf184b929e5467083fe5d..5e1c75533d805039f496468e6530991fb87bf6cc 100644 (file)
@@ -47,7 +47,6 @@ static int greybus_uevent(struct device *dev, struct kobj_uevent_env *env)
        struct gb_module *module = NULL;
        struct gb_interface *intf = NULL;
        struct gb_bundle *bundle = NULL;
-       struct gb_connection *connection = NULL;
 
        if (is_gb_endo(dev)) {
                /*
@@ -64,21 +63,11 @@ static int greybus_uevent(struct device *dev, struct kobj_uevent_env *env)
        } else if (is_gb_bundle(dev)) {
                bundle = to_gb_bundle(dev);
                intf = bundle->intf;
-       } else if (is_gb_connection(dev)) {
-               connection = to_gb_connection(dev);
-               bundle = connection->bundle;
-               intf = bundle->intf;
        } else {
                dev_WARN(dev, "uevent for unknown greybus device \"type\"!\n");
                return -EINVAL;
        }
 
-       if (connection) {
-               // FIXME
-               // add a uevent that can "load" a connection type
-               return 0;
-       }
-
        if (bundle) {
                // FIXME
                // add a uevent that can "load" a bundle type
index ec4a73884b0993096203723625583838a0e59904..ae5975632c5e93ae35177cb8b5d329c167ff3505 100644 (file)
@@ -189,11 +189,6 @@ static inline int is_gb_bundle(const struct device *dev)
        return dev->type == &greybus_bundle_type;
 }
 
-static inline int is_gb_connection(const struct device *dev)
-{
-       return dev->type == &greybus_connection_type;
-}
-
 static inline bool cport_id_valid(struct greybus_host_device *hd, u16 cport_id)
 {
        return cport_id != CPORT_ID_BAD && cport_id < hd->num_cports;