linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, bcm43xx-dev@lists.berlios.de,
	Johannes Berg <johannes@sipsolutions.net>
Subject: [patch 2/7] ssb: include modalias in uevent for core
Date: Tue, 14 Aug 2007 18:57:48 +0200	[thread overview]
Message-ID: <20070814165747.821518000@bu3sch.de> (raw)
In-Reply-To: 20070814165746.863593000@bu3sch.de

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>

Index: ssb-merge-new/drivers/ssb/main.c
===================================================================
--- ssb-merge-new.orig/drivers/ssb/main.c	2007-08-11 01:57:31.000000000 +0200
+++ ssb-merge-new/drivers/ssb/main.c	2007-08-11 20:26:57.000000000 +0200
@@ -317,6 +317,24 @@ static int ssb_bus_match(struct device *
 	return 0;
 }
 
+static int ssb_device_uevent(struct device *dev, char **envp, int num_envp,
+			     char *buffer, int buffer_size)
+{
+	struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
+	int ret, i = 0, length = 0;
+
+	if (!dev)
+		return -ENODEV;
+
+	ret = add_uevent_var(envp, num_envp, &i,
+			     buffer, buffer_size, &length,
+			     "MODALIAS=ssb:v%.4xid%.4xrev%.2x",
+			     ssb_dev->id.vendor, ssb_dev->id.coreid,
+			     ssb_dev->id.revision);
+	envp[i] = NULL;
+	return ret;
+}
+
 static struct bus_type ssb_bustype = {
 	.name		= "ssb",
 	.match		= ssb_bus_match,
@@ -325,6 +343,7 @@ static struct bus_type ssb_bustype = {
 	.shutdown	= ssb_device_shutdown,
 	.suspend	= ssb_device_suspend,
 	.resume		= ssb_device_resume,
+	.uevent		= ssb_device_uevent,
 };
 
 static void ssb_buses_lock(void)

-- 


  parent reply	other threads:[~2007-08-14 17:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070814165746.863593000@bu3sch.de>
2007-08-14 16:57 ` [patch 1/7] ssb: generate modaliases for modules Michael Buesch
2007-08-14 16:57 ` Michael Buesch [this message]
2007-08-14 16:57 ` [patch 3/7] ssb: Add GPIO support to Chip Common and PCI core drivers Michael Buesch
2007-08-14 16:57 ` [patch 4/7] ssb: Fix a warning in PCI core driver Michael Buesch
2007-08-14 16:57 ` [patch 5/7] ssb: Add Broadcom 43xx PCI to SSB bridge Michael Buesch
2007-08-14 16:57 ` [patch 6/7] ssb: Add debugging for buspower Michael Buesch
2007-08-14 16:57 ` [patch 7/7] ssb: Add kconfig SELECT workaround Michael Buesch

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=20070814165747.821518000@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).