[PATCH] i2c: class driver pass dev_t to the class core

2005-03-09 Thread Greg KH
ChangeSet 1.2043, 2005/03/09 09:51:50-08:00, [EMAIL PROTECTED]

[PATCH] i2c: class driver pass dev_t to the class core

Signed-off-by: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/i2c/i2c-dev.c |9 +
 1 files changed, 1 insertion(+), 8 deletions(-)


diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
--- a/drivers/i2c/i2c-dev.c 2005-03-09 16:29:27 -08:00
+++ b/drivers/i2c/i2c-dev.c 2005-03-09 16:29:27 -08:00
@@ -108,13 +108,6 @@
spin_unlock(_dev_array_lock);
 }
 
-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
-   struct i2c_dev *i2c_dev = to_i2c_dev(class_dev);
-   return print_dev_t(buf, MKDEV(I2C_MAJOR, i2c_dev->minor));
-}
-static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
-
 static ssize_t show_adapter_name(struct class_device *class_dev, char *buf)
 {
struct i2c_dev *i2c_dev = to_i2c_dev(class_dev);
@@ -451,11 +444,11 @@
else
i2c_dev->class_dev.dev = adap->dev.parent;
i2c_dev->class_dev.class = _dev_class;
+   i2c_dev->class_dev.devt = MKDEV(I2C_MAJOR, i2c_dev->minor);
snprintf(i2c_dev->class_dev.class_id, BUS_ID_SIZE, "i2c-%d", 
i2c_dev->minor);
retval = class_device_register(_dev->class_dev);
if (retval)
goto error;
-   class_device_create_file(_dev->class_dev, _device_attr_dev);
class_device_create_file(_dev->class_dev, _device_attr_name);
return 0;
 error:

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] i2c: class driver pass dev_t to the class core

2005-03-09 Thread Greg KH
ChangeSet 1.2043, 2005/03/09 09:51:50-08:00, [EMAIL PROTECTED]

[PATCH] i2c: class driver pass dev_t to the class core

Signed-off-by: Kay Sievers [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]


 drivers/i2c/i2c-dev.c |9 +
 1 files changed, 1 insertion(+), 8 deletions(-)


diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
--- a/drivers/i2c/i2c-dev.c 2005-03-09 16:29:27 -08:00
+++ b/drivers/i2c/i2c-dev.c 2005-03-09 16:29:27 -08:00
@@ -108,13 +108,6 @@
spin_unlock(i2c_dev_array_lock);
 }
 
-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
-   struct i2c_dev *i2c_dev = to_i2c_dev(class_dev);
-   return print_dev_t(buf, MKDEV(I2C_MAJOR, i2c_dev-minor));
-}
-static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
-
 static ssize_t show_adapter_name(struct class_device *class_dev, char *buf)
 {
struct i2c_dev *i2c_dev = to_i2c_dev(class_dev);
@@ -451,11 +444,11 @@
else
i2c_dev-class_dev.dev = adap-dev.parent;
i2c_dev-class_dev.class = i2c_dev_class;
+   i2c_dev-class_dev.devt = MKDEV(I2C_MAJOR, i2c_dev-minor);
snprintf(i2c_dev-class_dev.class_id, BUS_ID_SIZE, i2c-%d, 
i2c_dev-minor);
retval = class_device_register(i2c_dev-class_dev);
if (retval)
goto error;
-   class_device_create_file(i2c_dev-class_dev, class_device_attr_dev);
class_device_create_file(i2c_dev-class_dev, class_device_attr_name);
return 0;
 error:

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/