mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Chinea <carlos.chinea@nokia.com>
To: linux-kernel@vger.kernel.org
Cc: greg@kroah.com, linus.walleij@linaro.org,
	artem.bityutskiy@linux.intel.com, shubhrajyoti@ti.com
Subject: [PATCH 3/6] HSI: hsi: Remove controllers and ports from the bus
Date: Thu, 19 Apr 2012 15:05:24 +0300	[thread overview]
Message-ID: <1334837127-12931-4-git-send-email-carlos.chinea@nokia.com> (raw)
In-Reply-To: <1334837127-12931-1-git-send-email-carlos.chinea@nokia.com>

HSI controllers and ports do not belong to the HSI bus.
Those devices are not supposed to have a driver attached to them.

Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com>
---
 drivers/hsi/hsi.c |   20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)

diff --git a/drivers/hsi/hsi.c b/drivers/hsi/hsi.c
index 5c76a36..cec1f0c 100644
--- a/drivers/hsi/hsi.c
+++ b/drivers/hsi/hsi.c
@@ -29,18 +29,6 @@
 #include <linux/string.h>
 #include "hsi_core.h"
 
-static struct device_type hsi_ctrl = {
-	.name	= "hsi_controller",
-};
-
-static struct device_type hsi_cl = {
-	.name	= "hsi_client",
-};
-
-static struct device_type hsi_port = {
-	.name	= "hsi_port",
-};
-
 static ssize_t modalias_show(struct device *dev,
 			struct device_attribute *a __maybe_unused, char *buf)
 {
@@ -54,8 +42,7 @@ static struct device_attribute hsi_bus_dev_attrs[] = {
 
 static int hsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
 {
-	if (dev->type == &hsi_cl)
-		add_uevent_var(env, "MODALIAS=hsi:%s", dev_name(dev));
+	add_uevent_var(env, "MODALIAS=hsi:%s", dev_name(dev));
 
 	return 0;
 }
@@ -85,7 +72,6 @@ static void hsi_new_client(struct hsi_port *port, struct hsi_board_info *info)
 	cl = kzalloc(sizeof(*cl), GFP_KERNEL);
 	if (!cl)
 		return;
-	cl->device.type = &hsi_cl;
 	cl->tx_cfg = info->tx_cfg;
 	cl->rx_cfg = info->rx_cfg;
 	cl->device.bus = &hsi_bus_type;
@@ -175,15 +161,11 @@ int hsi_register_controller(struct hsi_controller *hsi)
 	unsigned int i;
 	int err;
 
-	hsi->device.type = &hsi_ctrl;
-	hsi->device.bus = &hsi_bus_type;
 	err = device_add(&hsi->device);
 	if (err < 0)
 		return err;
 	for (i = 0; i < hsi->num_ports; i++) {
 		hsi->port[i]->device.parent = &hsi->device;
-		hsi->port[i]->device.bus = &hsi_bus_type;
-		hsi->port[i]->device.type = &hsi_port;
 		err = device_add(&hsi->port[i]->device);
 		if (err < 0)
 			goto out;
-- 
1.7.5.4


  parent reply	other threads:[~2012-04-19 12:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 12:05 [PATCH 0/6] HSI fixes for 3.4 Carlos Chinea
2012-04-19 12:05 ` [PATCH 1/6] HSI: hsi: Rework hsi_controller release Carlos Chinea
2012-04-19 12:05 ` [PATCH 2/6] HSI: hsi: Fix error path cleanup on client registration Carlos Chinea
2012-04-19 12:05 ` Carlos Chinea [this message]
2012-04-19 12:05 ` [PATCH 4/6] HSI: hsi: Rework hsi_event interface Carlos Chinea
2012-04-19 12:05 ` [PATCH 5/6] HSI: hsi_char: Remove max_data_size from sysfs Carlos Chinea
2012-04-19 15:15   ` Greg KH
2012-04-19 12:05 ` [PATCH 6/6] HSI: Add HSI ABI documentation Carlos Chinea
2012-04-19 15:17   ` Greg KH
2012-04-20 13:21     ` Carlos Chinea
2012-04-19 15:17 ` [PATCH 0/6] HSI fixes for 3.4 Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334837127-12931-4-git-send-email-carlos.chinea@nokia.com \
    --to=carlos.chinea@nokia.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=greg@kroah.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shubhrajyoti@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®