public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: greg@kroah.com
Subject: [PATCH] Block: move struct disk_attribute to genhd.h
Date: Mon, 17 Jan 2005 13:45:00 -0800	[thread overview]
Message-ID: <11059983001705@kroah.com> (raw)
In-Reply-To: <11059983002081@kroah.com>

ChangeSet 1.2331, 2005/01/14 11:57:48-08:00, greg@kroah.com

[PATCH] Block: move struct disk_attribute to genhd.h

This allows other block devices to add attributes to their sysfs
entries.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


 drivers/block/aoe/aoeblk.c |    9 +--------
 drivers/block/genhd.c      |    6 ------
 include/linux/genhd.h      |    6 ++++++
 3 files changed, 7 insertions(+), 14 deletions(-)


diff -Nru a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
--- a/drivers/block/aoe/aoeblk.c	2005-01-17 13:35:31 -08:00
+++ b/drivers/block/aoe/aoeblk.c	2005-01-17 13:35:31 -08:00
@@ -12,14 +12,7 @@
 #include <linux/netdevice.h>
 #include "aoe.h"
 
-/* add attributes for our block devices in sysfs
- * (see drivers/block/genhd.c:disk_attr_show, etc.)
- */
-struct disk_attribute {
-	struct attribute attr;
-	ssize_t (*show)(struct gendisk *, char *);
-};
-
+/* add attributes for our block devices in sysfs */
 static ssize_t aoedisk_show_state(struct gendisk * disk, char *page)
 {
 	struct aoedev *d = disk->private_data;
diff -Nru a/drivers/block/genhd.c b/drivers/block/genhd.c
--- a/drivers/block/genhd.c	2005-01-17 13:35:31 -08:00
+++ b/drivers/block/genhd.c	2005-01-17 13:35:31 -08:00
@@ -315,12 +315,6 @@
 /*
  * kobject & sysfs bindings for block devices
  */
-
-struct disk_attribute {
-	struct attribute attr;
-	ssize_t (*show)(struct gendisk *, char *);
-};
-
 static ssize_t disk_attr_show(struct kobject *kobj, struct attribute *attr,
 			      char *page)
 {
diff -Nru a/include/linux/genhd.h b/include/linux/genhd.h
--- a/include/linux/genhd.h	2005-01-17 13:35:31 -08:00
+++ b/include/linux/genhd.h	2005-01-17 13:35:31 -08:00
@@ -128,6 +128,12 @@
 #endif
 };
 
+/* Structure for sysfs attributes on block devices */
+struct disk_attribute {
+	struct attribute attr;
+	ssize_t (*show)(struct gendisk *, char *);
+};
+
 /* 
  * Macros to operate on percpu disk statistics:
  *


  reply	other threads:[~2005-01-17 22:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-17 21:44 [BK PATCH] AOE and Block fixes for 2.6.11-rc1 Greg KH
2005-01-17 21:45 ` [PATCH] Block: Remove block_subsys.rwsem usage Greg KH
2005-01-17 21:45   ` Greg KH [this message]
2005-01-17 21:45     ` [PATCH] aoe: don't sleep with interrupts on Greg KH
2005-01-17 21:45       ` [PATCH] aoe: fix __init calling __exit 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=11059983001705@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /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