public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz
Cc: gregkh@suse.de
Subject: [PATCH] PCI: add MODALIAS to hotplug event for pci devices
Date: Tue, 17 May 2005 14:45:07 -0700	[thread overview]
Message-ID: <11163663073831@kroah.com> (raw)
In-Reply-To: <11163663063114@kroah.com>

[PATCH] PCI: add MODALIAS to hotplug event for pci devices

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
commit d1ded203adf16b42ca90e9041120ae465ca5c4a6
tree 59c3218467807e1793fb4fc5d90141e072ab2212
parent 9888549e0507cc95d1d7ade1595c00ff8e902659
author Greg KH <gregkh@suse.de> Thu, 05 May 2005 11:57:25 -0700
committer Greg KH <gregkh@suse.de> Tue, 17 May 2005 14:31:12 -0700

 drivers/pci/hotplug.c |   10 ++++++++++
 1 files changed, 10 insertions(+)

Index: drivers/pci/hotplug.c
===================================================================
--- 9c31d2b34ef9b747733f7f39916a8031f89c3d1e/drivers/pci/hotplug.c  (mode:100644)
+++ 59c3218467807e1793fb4fc5d90141e072ab2212/drivers/pci/hotplug.c  (mode:100644)
@@ -52,6 +52,16 @@
 	if ((buffer_size - length <= 0) || (i >= num_envp))
 		return -ENOMEM;
 
+	envp[i++] = scratch;
+	length += scnprintf (scratch, buffer_size - length,
+			    "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x\n",
+			    pdev->vendor, pdev->device,
+			    pdev->subsystem_vendor, pdev->subsystem_device,
+			    (u8)(pdev->class >> 16), (u8)(pdev->class >> 8),
+			    (u8)(pdev->class));
+	if ((buffer_size - length <= 0) || (i >= num_envp))
+		return -ENOMEM;
+
 	envp[i] = NULL;
 
 	return 0;


  reply	other threads:[~2005-05-17 21:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-17 21:44 [GIT PATCH] PCI bugfixes for 2.6.12-rc4 Greg KH
2005-05-17 21:45 ` [PATCH] PCI Hotplug: Fix echoing 1 to power file of enabled slot problem with SHPC driver Greg KH
2005-05-17 21:45   ` [PATCH] PCI Hotplug: CPCI update Greg KH
2005-05-17 21:45     ` [PATCH] PCI Hotplug: get pciehp to work on the downstream port of a switch Greg KH
2005-05-17 21:45       ` [PATCH] PCI Hotplug: remove pci_visit_dev Greg KH
2005-05-17 21:45         ` [PATCH] PCI: add modalias sysfs file for pci devices Greg KH
2005-05-17 21:45           ` Greg KH [this message]
2005-05-31 16:50           ` Michael Tokarev
2005-06-01 21:36             ` 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=11163663073831@kroah.com \
    --to=gregkh@suse.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /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