]> git.hungrycats.org Git - linux/commitdiff
I2C: move the name field back into the i2c_client and i2c_adapter structures.
authorGreg Kroah-Hartman <greg@kroah.com>
Fri, 8 Aug 2003 09:15:11 +0000 (02:15 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 8 Aug 2003 09:15:11 +0000 (02:15 -0700)
This is because the name field of struct device is going away, and the name
fields on these i2c structures are useful for people.

44 files changed:
drivers/i2c/busses/i2c-ali1535.c
drivers/i2c/busses/i2c-ali15x3.c
drivers/i2c/busses/i2c-amd756.c
drivers/i2c/busses/i2c-amd8111.c
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-isa.c
drivers/i2c/busses/i2c-nforce2.c
drivers/i2c/busses/i2c-piix4.c
drivers/i2c/busses/i2c-sis96x.c
drivers/i2c/busses/i2c-viapro.c
drivers/i2c/chips/adm1021.c
drivers/i2c/chips/it87.c
drivers/i2c/chips/lm75.c
drivers/i2c/chips/lm78.c
drivers/i2c/chips/lm85.c
drivers/i2c/chips/via686a.c
drivers/i2c/chips/w83781d.c
drivers/i2c/i2c-algo-bit.c
drivers/i2c/i2c-core.c
drivers/i2c/i2c-dev.c
drivers/i2c/i2c-elektor.c
drivers/i2c/i2c-elv.c
drivers/i2c/i2c-philips-par.c
drivers/i2c/i2c-prosavage.c
drivers/i2c/i2c-velleman.c
drivers/i2c/scx200_acb.c
drivers/media/common/saa7146_i2c.c
drivers/media/video/adv7175.c
drivers/media/video/bt819.c
drivers/media/video/bt856.c
drivers/media/video/bttv-cards.c
drivers/media/video/msp3400.c
drivers/media/video/saa5249.c
drivers/media/video/saa7110.c
drivers/media/video/saa7111.c
drivers/media/video/saa7134/saa7134-i2c.c
drivers/media/video/saa7185.c
drivers/media/video/tda9840.c
drivers/media/video/tda9887.c
drivers/media/video/tea6415c.c
drivers/media/video/tea6420.c
drivers/media/video/tuner-3036.c
drivers/media/video/tuner.c
include/linux/i2c.h

index 66720c091152f4daf6e35918345d26a15ca015bd..33c140678124ea3815e269df0e120695d8d39abb 100644 (file)
@@ -483,9 +483,7 @@ static struct i2c_adapter ali1535_adapter = {
        .owner          = THIS_MODULE,
        .id             = I2C_ALGO_SMBUS | I2C_HW_SMBUS_ALI1535,
        .algo           = &smbus_algorithm,
-       .dev            = {
-               .name   = "unset",
-       }
+       .name           = "unset",
 };
 
 static struct pci_device_id ali1535_ids[] = {
@@ -509,7 +507,7 @@ static int __devinit ali1535_probe(struct pci_dev *dev, const struct pci_device_
        /* set up the driverfs linkage to our parent device */
        ali1535_adapter.dev.parent = &dev->dev;
 
-       snprintf(ali1535_adapter.dev.name, DEVICE_NAME_SIZE, 
+       snprintf(ali1535_adapter.name, DEVICE_NAME_SIZE, 
                "SMBus ALI1535 adapter at %04x", ali1535_smba);
        return i2c_add_adapter(&ali1535_adapter);
 }
index 95e4866bc10a0ca48e3fb9a8c22f34db8402cafb..d7e76bc389c9073d656f4f6562cae06bd085534a 100644 (file)
@@ -474,9 +474,7 @@ static struct i2c_adapter ali15x3_adapter = {
        .id             = I2C_ALGO_SMBUS | I2C_HW_SMBUS_ALI15X3,
        .class          = I2C_ADAP_CLASS_SMBUS,
        .algo           = &smbus_algorithm,
-       .dev            = {
-               .name   = "unset",
-       },
+       .name           = "unset",
 };
 
 static struct pci_device_id ali15x3_ids[] = {
@@ -500,7 +498,7 @@ static int __devinit ali15x3_probe(struct pci_dev *dev, const struct pci_device_
        /* set up the driverfs linkage to our parent device */
        ali15x3_adapter.dev.parent = &dev->dev;
 
-       snprintf(ali15x3_adapter.dev.name, DEVICE_NAME_SIZE,
+       snprintf(ali15x3_adapter.name, DEVICE_NAME_SIZE,
                "SMBus ALI15X3 adapter at %04x", ali15x3_smba);
        return i2c_add_adapter(&ali15x3_adapter);
 }
index d6ca0f0e9da340237edade48016da8d20e6cbcd1..1b9ad3179ad682594b4d9f552bd76a2e8d4c41b9 100644 (file)
@@ -307,9 +307,7 @@ static struct i2c_adapter amd756_adapter = {
        .id             = I2C_ALGO_SMBUS | I2C_HW_SMBUS_AMD756,
        .class          = I2C_ADAP_CLASS_SMBUS,
        .algo           = &smbus_algorithm,
-       .dev            = {
-               .name   = "unset",
-       },
+       .name           = "unset",
 };
 
 enum chiptype { AMD756, AMD766, AMD768, NFORCE };
@@ -371,7 +369,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev,
        /* set up the driverfs linkage to our parent device */
        amd756_adapter.dev.parent = &pdev->dev;
 
-       snprintf(amd756_adapter.dev.name, DEVICE_NAME_SIZE,
+       snprintf(amd756_adapter.name, DEVICE_NAME_SIZE,
                "SMBus AMD75x adapter at %04x", amd756_ioport);
 
        error = i2c_add_adapter(&amd756_adapter);
index c74475ea97b73e796273345b11fe5b52a281f115..9dc1b0a7be799aef33a8ffe1d814c3a9cca86391 100644 (file)
@@ -356,7 +356,7 @@ static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_
                goto out_kfree;
 
        smbus->adapter.owner = THIS_MODULE;
-       snprintf(smbus->adapter.dev.name, DEVICE_NAME_SIZE,
+       snprintf(smbus->adapter.name, DEVICE_NAME_SIZE,
                "SMBus2 AMD8111 adapter at %04x", smbus->base);
        smbus->adapter.id = I2C_ALGO_SMBUS | I2C_HW_SMBUS_AMD8111;
        smbus->adapter.class = I2C_ADAP_CLASS_SMBUS;
index 6059c27b3cc7f3bdc7a6835025b3eb86d4980c38..9ea4927a2b1425e56c9c1e18e7d635de844ca272 100644 (file)
@@ -543,9 +543,7 @@ static struct i2c_adapter i801_adapter = {
        .id             = I2C_ALGO_SMBUS | I2C_HW_SMBUS_I801,
        .class          = I2C_ADAP_CLASS_SMBUS,
        .algo           = &smbus_algorithm,
-       .dev            = {
-               .name   = "unset",
-       },
+       .name           = "unset",
 };
 
 static struct pci_device_id i801_ids[] = {
@@ -600,7 +598,7 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id
        /* set up the driverfs linkage to our parent device */
        i801_adapter.dev.parent = &dev->dev;
 
-       snprintf(i801_adapter.dev.name, DEVICE_NAME_SIZE,
+       snprintf(i801_adapter.name, DEVICE_NAME_SIZE,
                "SMBus I801 adapter at %04x", i801_smba);
        return i2c_add_adapter(&i801_adapter);
 }
index c49a874764e547ee584bde4df968e5005b9cdf8c..4cbda18c7663bb8818a1e70c42039edd957e8384 100644 (file)
@@ -42,9 +42,7 @@ static struct i2c_adapter isa_adapter = {
        .id             = I2C_ALGO_ISA | I2C_HW_ISA,
        .class          = I2C_ADAP_CLASS_SMBUS,
        .algo           = &isa_algorithm,
-       .dev            = {
-               .name   = "ISA main adapter",
-       },
+       .name           = "ISA main adapter",
 };
 
 static int __init i2c_isa_init(void)
index 5834424d88c655207cfe2d22debdf31c36e884e5..e8496c5ab597dee062876b9709d3194aabd7f777 100644 (file)
@@ -125,9 +125,7 @@ static struct i2c_adapter nforce2_adapter = {
        .id             = I2C_ALGO_SMBUS | I2C_HW_SMBUS_NFORCE2,
        .class          = I2C_ADAP_CLASS_SMBUS,
        .algo           = &smbus_algorithm,
-       .dev            = {
-               .name   = "unset",
-       },
+       .name           = "unset",
 };
 
 
@@ -342,7 +340,7 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int reg,
 */
        smbus->adapter = nforce2_adapter;
        smbus->adapter.dev.parent = &dev->dev;
-       snprintf(smbus->adapter.dev.name, DEVICE_NAME_SIZE,
+       snprintf(smbus->adapter.name, DEVICE_NAME_SIZE,
                "SMBus nForce2 adapter at %04x", smbus->base);
 
        error = i2c_add_adapter(&smbus->adapter);
index e2c30762206cf7be7f45ca6f97b05f99a3ca988d..ce5a6c8247db01c807a37b7426a50e5ef61b1405 100644 (file)
@@ -127,7 +127,7 @@ static int piix4_setup(struct pci_dev *PIIX4_dev, const struct pci_device_id *id
        if (PCI_FUNC(PIIX4_dev->devfn) != id->driver_data)
                return -ENODEV;
 
-       dev_info(&PIIX4_dev->dev, "Found %s device\n", PIIX4_dev->dev.name);
+       dev_info(&PIIX4_dev->dev, "Found %s device\n", pci_name(PIIX4_dev));
 
        if(ibm_dmi_probe()) {
                dev_err(&PIIX4_dev->dev, "IBM Laptop detected; this module "
@@ -389,9 +389,7 @@ static struct i2c_adapter piix4_adapter = {
        .id             = I2C_ALGO_SMBUS | I2C_HW_SMBUS_PIIX4,
        .class          = I2C_ADAP_CLASS_SMBUS,
        .algo           = &smbus_algorithm,
-       .dev            = {
-               .name   = "unset",
-       },
+       .name           = "unset",
 };
 
 static struct pci_device_id piix4_ids[] = {
@@ -444,7 +442,7 @@ static int __devinit piix4_probe(struct pci_dev *dev, const struct pci_device_id
        /* set up the driverfs linkage to our parent device */
        piix4_adapter.dev.parent = &dev->dev;
 
-       snprintf(piix4_adapter.dev.name, DEVICE_NAME_SIZE,
+       snprintf(piix4_adapter.name, DEVICE_NAME_SIZE,
                "SMBus PIIX4 adapter at %04x", piix4_smba);
 
        retval = i2c_add_adapter(&piix4_adapter);
index baf4ec309f7b47abc1dc7a93584440a4a9f5d052..4e5a5af9f638d223d1f22f7ff64f7f72dd300dce 100644 (file)
@@ -264,9 +264,7 @@ static struct i2c_adapter sis96x_adapter = {
        .id             = I2C_ALGO_SMBUS | I2C_HW_SMBUS_SIS96X,
        .class          = I2C_ADAP_CLASS_SMBUS,
        .algo           = &smbus_algorithm,
-       .dev            = {
-               .name   ="unset",
-       },
+       .name           = "unset",
 };
 
 static struct pci_device_id sis96x_ids[] = {
@@ -320,7 +318,7 @@ static int __devinit sis96x_probe(struct pci_dev *dev,
        /* set up the driverfs linkage to our parent device */
        sis96x_adapter.dev.parent = &dev->dev;
 
-       snprintf(sis96x_adapter.dev.name, DEVICE_NAME_SIZE,
+       snprintf(sis96x_adapter.name, DEVICE_NAME_SIZE,
                "SiS96x SMBus adapter at 0x%04x", sis96x_smbus_base);
 
        if ((retval = i2c_add_adapter(&sis96x_adapter))) {
index 5360cbdc8036f5da3e2a24b7928d5226e1386dab..b4238dcba725c72be774b42159f596f13ac197ca 100644 (file)
@@ -290,9 +290,7 @@ static struct i2c_adapter vt596_adapter = {
        .id             = I2C_ALGO_SMBUS | I2C_HW_SMBUS_VIA2,
        .class          = I2C_ADAP_CLASS_SMBUS,
        .algo           = &smbus_algorithm,
-       .dev            = {
-               .name   = "unset",
-       },
+       .name           = "unset",
 };
 
 static int __devinit vt596_probe(struct pci_dev *pdev,
@@ -378,7 +376,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
        dev_dbg(&pdev->dev, "VT596_smba = 0x%X\n", vt596_smba);
 
        vt596_adapter.dev.parent = &pdev->dev;
-       snprintf(vt596_adapter.dev.name, DEVICE_NAME_SIZE,
+       snprintf(vt596_adapter.name, DEVICE_NAME_SIZE,
                        "SMBus Via Pro adapter at %04x", vt596_smba);
        
        return i2c_add_adapter(&vt596_adapter);
index 739ce6e2bc38c8d86eab7ca36079023e8c5ff6bd..cf6860dd33e53bddabcca137c09f14fe3ccb77c6 100644 (file)
@@ -320,7 +320,7 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind)
        }
 
        /* Fill in the remaining client fields and put it into the global list */
-       strlcpy(new_client->dev.name, client_name, DEVICE_NAME_SIZE);
+       strlcpy(new_client->name, client_name, DEVICE_NAME_SIZE);
        data->type = kind;
 
        new_client->id = adm1021_id++;
index 8d04da1fbe1a6d901e148f9625665ac056e21c1f..16181e1fea9c6fa0ccc35403dcc77d89485c3b29 100644 (file)
@@ -692,7 +692,7 @@ int it87_detect(struct i2c_adapter *adapter, int address, int kind)
        }
 
        /* Fill in the remaining client fields and put it into the global list */
-       strlcpy(new_client->dev.name, name, DEVICE_NAME_SIZE);
+       strlcpy(new_client->name, name, DEVICE_NAME_SIZE);
 
        data->type = kind;
 
index ab4e4ab23b540ea82dca417208387aeb6665e8ed..e1ee02327b8e1f8d15f8b050997fdd1e6c2c037b 100644 (file)
@@ -194,7 +194,7 @@ static int lm75_detect(struct i2c_adapter *adapter, int address, int kind)
        }
 
        /* Fill in the remaining client fields and put it into the global list */
-       strlcpy(new_client->dev.name, name, DEVICE_NAME_SIZE);
+       strlcpy(new_client->name, name, DEVICE_NAME_SIZE);
 
        new_client->id = lm75_id++;
        data->valid = 0;
index 2dbdf60a87f65fc2e5c756d63117c383299f06a0..ccca9415d448f113c4241a940f410f47f718e793 100644 (file)
@@ -638,7 +638,7 @@ int lm78_detect(struct i2c_adapter *adapter, int address, int kind)
        }
 
        /* Fill in the remaining client fields and put into the global list */
-       strlcpy(new_client->dev.name, client_name, DEVICE_NAME_SIZE);
+       strlcpy(new_client->name, client_name, DEVICE_NAME_SIZE);
        data->type = kind;
 
        data->valid = 0;
index a704f5959b5663102c840adcf6e0bb3a267a8aab..e700a01376ea5a283fd70ed37bde4e216354b1ce 100644 (file)
@@ -853,19 +853,19 @@ int lm85_detect(struct i2c_adapter *adapter, int address,
        /* Fill in the chip specific driver values */
        if ( kind == any_chip ) {
                type_name = "lm85";
-               strlcpy(new_client->dev.name, "Generic LM85", DEVICE_NAME_SIZE);
+               strlcpy(new_client->name, "Generic LM85", DEVICE_NAME_SIZE);
        } else if ( kind == lm85b ) {
                type_name = "lm85b";
-               strlcpy(new_client->dev.name, "National LM85-B", DEVICE_NAME_SIZE);
+               strlcpy(new_client->name, "National LM85-B", DEVICE_NAME_SIZE);
        } else if ( kind == lm85c ) {
                type_name = "lm85c";
-               strlcpy(new_client->dev.name, "National LM85-C", DEVICE_NAME_SIZE);
+               strlcpy(new_client->name, "National LM85-C", DEVICE_NAME_SIZE);
        } else if ( kind == adm1027 ) {
                type_name = "adm1027";
-               strlcpy(new_client->dev.name, "Analog Devices ADM1027", DEVICE_NAME_SIZE);
+               strlcpy(new_client->name, "Analog Devices ADM1027", DEVICE_NAME_SIZE);
        } else if ( kind == adt7463 ) {
                type_name = "adt7463";
-               strlcpy(new_client->dev.name, "Analog Devices ADT7463", DEVICE_NAME_SIZE);
+               strlcpy(new_client->name, "Analog Devices ADT7463", DEVICE_NAME_SIZE);
        } else {
                dev_dbg(&adapter->dev, "Internal error, invalid kind (%d)!", kind);
                err = -EFAULT ;
@@ -880,7 +880,7 @@ int lm85_detect(struct i2c_adapter *adapter, int address,
 
        if (lm85debug) {
                printk("lm85: Assigning ID %d to %s at %d,0x%02x\n",
-               new_client->id, new_client->dev.name,
+               new_client->id, new_client->name,
                i2c_adapter_id(new_client->adapter),
                new_client->addr);
        }
index d027bd9c31b622750c130b4487c04731c83652e9..d5d36c6bb21a67bfe7fe961aef957791261752e9 100644 (file)
@@ -727,7 +727,7 @@ static int via686a_detect(struct i2c_adapter *adapter, int address, int kind)
        new_client->dev.parent = &adapter->dev;
 
        /* Fill in the remaining client fields and put into the global list */
-       snprintf(new_client->dev.name, DEVICE_NAME_SIZE, client_name);
+       snprintf(new_client->name, DEVICE_NAME_SIZE, client_name);
 
        data->valid = 0;
        init_MUTEX(&data->update_lock);
index 6676a84d78bd5c9050a12564f14d4b5ade4a53df..bfbe794eb687c26b7a25b82c7f6177cec2c0d2d4 100644 (file)
@@ -1116,7 +1116,7 @@ w83781d_detect_subclients(struct i2c_adapter *adapter, int address, int kind,
                data->lm75[i]->adapter = adapter;
                data->lm75[i]->driver = &w83781d_driver;
                data->lm75[i]->flags = 0;
-               strlcpy(data->lm75[i]->dev.name, client_name,
+               strlcpy(data->lm75[i]->name, client_name,
                        DEVICE_NAME_SIZE);
                if ((err = i2c_attach_client(data->lm75[i]))) {
                        dev_err(&new_client->dev, "Subclient %d "
@@ -1326,7 +1326,7 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
        }
 
        /* Fill in the remaining client fields and put into the global list */
-       strlcpy(new_client->dev.name, client_name, DEVICE_NAME_SIZE);
+       strlcpy(new_client->name, client_name, DEVICE_NAME_SIZE);
        data->type = kind;
 
        data->valid = 0;
index 48b69f61d1efc0127fdf3a19ac925e248c61d239..f8330b3ef5d31bad7573d50e4ed72922334c03da 100644 (file)
@@ -527,7 +527,7 @@ int i2c_bit_add_bus(struct i2c_adapter *adap)
        struct i2c_algo_bit_data *bit_adap = adap->algo_data;
 
        if (bit_test) {
-               int ret = test_bus(bit_adap, adap->dev.name);
+               int ret = test_bus(bit_adap, adap->name);
                if (ret<0)
                        return -ENODEV;
        }
index a200d525ccf799f1284105210387e0d471c9df6d..99b9765cf0be194430ca63b881434f51ae1f3719 100644 (file)
@@ -250,7 +250,7 @@ int i2c_del_driver(struct i2c_driver *driver)
                                        continue;
                                DEB2(printk(KERN_DEBUG "i2c-core.o: "
                                            "detaching client %s:\n",
-                                           client->dev.name));
+                                           client->name));
                                if ((res = driver->detach_client(client))) {
                                        dev_err(&adap->dev, "while "
                                                "unregistering driver "
@@ -352,7 +352,7 @@ int i2c_detach_client(struct i2c_client *client)
                if (res) {
                        printk(KERN_ERR
                               "i2c-core.o: client_unregister [%s] failed, "
-                              "client not detached", client->dev.name);
+                              "client not detached", client->name);
                        goto out;
                }
        }
index 2e5426fff4898199eb259e3c03807bc8eda07a1e..b601d51fa9b7d231aedccd8e4b1787b9d854ccda 100644 (file)
@@ -484,9 +484,7 @@ static struct i2c_driver i2cdev_driver = {
 };
 
 static struct i2c_client i2cdev_client_template = {
-       .dev            = {
-               .name   = "I2C /dev entry",
-       },
+       .name           = "I2C /dev entry",
        .id             = 1,
        .addr           = -1,
        .driver         = &i2cdev_driver,
index 9b42498996b86051fc02e99e18b8108d216c4472..1a38e1f6eaac94606f7efcb5e4c5655801684b9c 100644 (file)
@@ -178,9 +178,7 @@ static struct i2c_adapter pcf_isa_ops = {
        .owner          = THIS_MODULE,
        .id             = I2C_HW_P_ELEK,
        .algo_data      = &pcf_isa_data,
-       .dev            = {
-               .name   = "PCF8584 ISA adapter",
-       },
+       .name           = "PCF8584 ISA adapter",
 };
 
 static int __init i2c_pcfisa_init(void) 
index 82237f6651fa9539a9abaf1fec63a0e74ad3122c..2045dc32b044fcbc01fca8255d66418f3d10b697 100644 (file)
@@ -131,9 +131,7 @@ static struct i2c_adapter bit_elv_ops = {
        .owner          = THIS_MODULE,
        .id             = I2C_HW_B_ELV,
        .algo_data      = &bit_elv_data,
-       .dev            = {
-               .name   = "ELV Parallel port adaptor",
-       },
+       .name           = "ELV Parallel port adaptor",
 };
 
 static int __init i2c_bitelv_init(void)
index ee8ae073f7ff69857f52ed8d425f491da17cc898..3c2ea43574c4aa4a7aa910a30ba105ebed0b8c50 100644 (file)
@@ -152,9 +152,7 @@ static struct i2c_algo_bit_data bit_lp_data2 = {
 static struct i2c_adapter bit_lp_ops = {
        .owner          = THIS_MODULE,
        .id             = I2C_HW_B_LP,
-       .dev            = {
-               .name   = "Philips Parallel port adapter",
-       },
+       .name           = "Philips Parallel port adapter",
 };
 
 static void i2c_parport_attach (struct parport *port)
index 428bdc5c1f8bef72781e163893673a55b3f36869..03841dd9fb09dfd62061b2f3df497e91719dbc34 100644 (file)
 #define        DRIVER_ID       "i2c-prosavage"
 #define        DRIVER_VERSION  "20030621"
 
-/* lm_sensors2 / kernel 2.5.xx compatibility */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 #define ADAPTER_NAME(x) (x).name
-#else
-#define ADAPTER_NAME(x) (x).dev.name
-#endif /* LINUX_VERSION_CODE */
 
 #define MAX_BUSSES     2
 
index 13b2e5ea322437cb70b51bc23621222f2ca60039..c5fccb7b37b0ad33bea8185641df978546eb27e3 100644 (file)
@@ -116,9 +116,7 @@ static struct i2c_adapter bit_velle_ops = {
        .owner          = THIS_MODULE,
        .id             = I2C_HW_B_VELLE,
        .algo_data      = &bit_velle_data,
-       .dev            = {
-               .name   = "Velleman K8000",
-       },
+       .name           = "Velleman K8000",
 };
 
 static int __init i2c_bitvelle_init(void)
index 74e165cd8982d6a9bd593bce29edb0e31c644379..34a6db05f7f2ddc8585a42fd76e1bf6643df4967 100644 (file)
@@ -456,14 +456,14 @@ static int  __init scx200_acb_create(int base, int index)
        memset(iface, 0, sizeof(*iface));
        adapter = &iface->adapter;
        i2c_set_adapdata(adapter, iface);
-       snprintf(adapter->dev.name, DEVICE_NAME_SIZE, "SCx200 ACB%d", index);
+       snprintf(adapter->name, DEVICE_NAME_SIZE, "SCx200 ACB%d", index);
        adapter->owner = THIS_MODULE;
        adapter->id = I2C_ALGO_SMBUS;
        adapter->algo = &scx200_acb_algorithm;
 
        init_MUTEX(&iface->sem);
 
-       snprintf(description, sizeof(description), "NatSemi SCx200 ACCESS.bus [%s]", adapter->dev.name);
+       snprintf(description, sizeof(description), "NatSemi SCx200 ACCESS.bus [%s]", adapter->name);
        if (request_region(base, 8, description) == 0) {
                dev_err(&adapter->dev, "can't allocate io 0x%x-0x%x\n",
                        base, base + 8-1);
index c23e5c829822d9d56aa95340b0324c6d49e6c711..8775a874caf2b0fd34c2ae8181cf9f871afa72e1 100644 (file)
@@ -407,11 +407,10 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c
 
        if( NULL != i2c_adapter ) {
                memset(i2c_adapter,0,sizeof(struct i2c_adapter));
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
                strcpy(i2c_adapter->name, dev->name);   
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
                i2c_adapter->data = dev;
 #else
-               strcpy(i2c_adapter->dev.name, dev->name);       
                i2c_set_adapdata(i2c_adapter,dev);
 #endif
                i2c_adapter->algo          = &saa7146_algo;
index a3e4a766da732690a73bb172fb06a39d72617902..3f3adcca4ba1516f803ec192b768d32bf62f3f8f 100644 (file)
@@ -159,7 +159,7 @@ static const unsigned char init_ntsc[] = {
        0x06, 0x1a,             /* subc. phase */
 };
 
-static int adv717x_attach(struct i2c_adapter *adap, int addr, unsigned short flags, int kind)
+static int adv717x_attach(struct i2c_adapter *adap, int addr, int kind)
 {
        struct adv7175 *encoder;
        struct  i2c_client      *client;
@@ -191,7 +191,7 @@ static int adv717x_attach(struct i2c_adapter *adap, int addr, unsigned short fla
                // We should never get here!!!
                dname = unknown_name;
        }
-       strlcpy(client->dev.name, dname, DEVICE_NAME_SIZE);
+       strlcpy(client->name, dname, DEVICE_NAME_SIZE);
        init_MUTEX(&encoder->lock);
        encoder->client = client;
        i2c_set_clientdata(client, encoder);
@@ -203,7 +203,7 @@ static int adv717x_attach(struct i2c_adapter *adap, int addr, unsigned short fla
        for (i=1; i<x_common; i++) {
                rv = i2c_smbus_write_byte(client,init_common[i]);
                if (rv < 0) {
-                       printk(KERN_ERR "%s_attach: init error %d\n", client->dev.name, rv);
+                       printk(KERN_ERR "%s_attach: init error %d\n", client->name, rv);
                        break;
                }
        }
@@ -213,7 +213,7 @@ static int adv717x_attach(struct i2c_adapter *adap, int addr, unsigned short fla
                i2c_smbus_write_byte_data(client,0x07, TR0MODE);
                i2c_smbus_read_byte_data(client,0x12);
                printk(KERN_INFO "%s_attach: %s rev. %d at 0x%02x\n",
-                      client->dev.name, dname, rv & 1, client->addr);
+                      client->name, dname, rv & 1, client->addr);
        }
 
        i2c_attach_client(client);
@@ -297,9 +297,8 @@ static int adv717x_command(struct i2c_client *client, unsigned int cmd,
                                        i2c_smbus_write_byte_data(client,0x07, TR0MODE);
                                        break;
                                default:
-                                       printk(KERN_ERR
-                                              "%s: illegal norm: %d\n",
-                                              client->dev.name, iarg);
+                                       printk(KERN_ERR "%s: illegal norm: %d\n",
+                                              client->name, iarg);
                                        return -EINVAL;
 
                                }
@@ -353,9 +352,8 @@ static int adv717x_command(struct i2c_client *client, unsigned int cmd,
                                        break;
 
                                default:
-                                       printk(KERN_ERR
-                                              "%s: illegal input: %d\n",
-                                              client->dev.name, iarg);
+                                       printk(KERN_ERR "%s: illegal input: %d\n",
+                                              client->name, iarg);
                                        return -EINVAL;
 
                                }
@@ -422,9 +420,7 @@ static struct i2c_driver i2c_driver_adv7176 = {
 
 static struct i2c_client client_template = {
        .driver         = &i2c_driver_adv7175,
-       .dev            = {
-               .name   = "adv7175_client",
-       },
+       .name           = "adv7175_client",
 };
 
 static int adv717x_init(void)
index 365ecc577ccc83a1cb897bd82e18a3033151f6fe..9cb5152e010f833949b572a405c272df8b276a8d 100644 (file)
@@ -150,7 +150,7 @@ static int bt819_init(struct i2c_client *client)
 
 /* ----------------------------------------------------------------------- */
 
-static int bt819_attach(struct i2c_adapter *adap, int addr , unsigned long flags, int kind)
+static int bt819_attach(struct i2c_adapter *adap, int addr, int kind)
 {
        int i;
        struct bt819 *decoder;
@@ -172,7 +172,7 @@ static int bt819_attach(struct i2c_adapter *adap, int addr , unsigned long flags
        }
 
        memset(decoder, 0, sizeof(struct bt819));
-       strlcpy(client->dev.name, "bt819", DEVICE_NAME_SIZE);
+       strlcpy(client->name, "bt819", DEVICE_NAME_SIZE);
        i2c_set_clientdata(client, decoder);
        decoder->client = client;
        decoder->addr = addr;
@@ -188,10 +188,10 @@ static int bt819_attach(struct i2c_adapter *adap, int addr , unsigned long flags
        i = bt819_init(client);
        if (i < 0) {
                printk(KERN_ERR "%s: bt819_attach: init status %d\n",
-                      decoder->client->dev.name, i);
+                      decoder->client->name, i);
        } else {
                printk(KERN_INFO "%s: bt819_attach: chip version %x\n",
-                      decoder->client->dev.name, i2c_smbus_read_byte_data(client,
+                      decoder->client->name, i2c_smbus_read_byte_data(client,
                                                      0x17) & 0x0f);
        }
        init_MUTEX(&decoder->lock);
@@ -270,7 +270,7 @@ static int bt819_command(struct i2c_client *client, unsigned int cmd, void *arg)
                        *iarg = res;
 
                        DEBUG(printk(KERN_INFO "%s-bt819: get status %x\n",
-                                    decoder->client->dev.name, *iarg));
+                                    decoder->client->name, *iarg));
                }
                break;
 
@@ -280,7 +280,7 @@ static int bt819_command(struct i2c_client *client, unsigned int cmd, void *arg)
                        struct timing *timing;
 
                        DEBUG(printk(KERN_INFO "%s-bt819: set norm %x\n",
-                                    decoder->client->dev.name, *iarg));
+                                    decoder->client->name, *iarg));
 
                        if (*iarg == VIDEO_MODE_NTSC) {
                                bt819_setbit(decoder, 0x01, 0, 1);
@@ -321,7 +321,7 @@ static int bt819_command(struct i2c_client *client, unsigned int cmd, void *arg)
                        int *iarg = arg;
 
                        DEBUG(printk(KERN_INFO "%s-bt819: set input %x\n",
-                                    decoder->client->dev.name, *iarg));
+                                    decoder->client->name, *iarg));
 
                        if (*iarg < 0 || *iarg > 7) {
                                return -EINVAL;
@@ -346,7 +346,7 @@ static int bt819_command(struct i2c_client *client, unsigned int cmd, void *arg)
                        int *iarg = arg;
 
                        DEBUG(printk(KERN_INFO "%s-bt819: set output %x\n",
-                                    decoder->client->dev.name, *iarg));
+                                    decoder->client->name, *iarg));
 
                        /* not much choice of outputs */
                        if (*iarg != 0) {
@@ -362,7 +362,7 @@ static int bt819_command(struct i2c_client *client, unsigned int cmd, void *arg)
 
                        DEBUG(printk
                              (KERN_INFO "%s-bt819: enable output %x\n",
-                              decoder->client->dev.name, *iarg));
+                              decoder->client->name, *iarg));
 
                        if (decoder->enable != enable) {
                                decoder->enable = enable;
@@ -383,7 +383,7 @@ static int bt819_command(struct i2c_client *client, unsigned int cmd, void *arg)
                        DEBUG(printk
                              (KERN_INFO
                               "%s-bt819: set picture brightness %d contrast %d colour %d\n",
-                              decoder->client->dev.name, pic->brightness,
+                              decoder->client->name, pic->brightness,
                               pic->contrast, pic->colour));
 
 
@@ -452,9 +452,7 @@ static struct i2c_driver i2c_driver_bt819 = {
 static struct i2c_client client_template = {
        .id = -1,
        .driver = &i2c_driver_bt819,
-       .dev = {
-               .name = "bt819_client",
-       },
+       .name = "bt819_client",
 };
 
 static int bt819_setup(void)
index ddd68c5352d48f6cac880df4859cf3bdca3fa8b8..0888febb383107faa7b227365b0462143b431d29 100644 (file)
@@ -97,7 +97,7 @@ static int bt856_setbit(struct bt856 *dev, int subaddr, int bit, int data)
 
 /* ----------------------------------------------------------------------- */
 
-static int bt856_attach(struct i2c_adapter *adap, int addr , unsigned long flags, int kind)
+static int bt856_attach(struct i2c_adapter *adap, int addr, int kind)
 {
        struct bt856 *encoder;
        struct i2c_client *client;
@@ -123,14 +123,14 @@ static int bt856_attach(struct i2c_adapter *adap, int addr , unsigned long flags
 
 
        memset(encoder, 0, sizeof(struct bt856));
-       strlcpy(client->dev.name, "bt856", DEVICE_NAME_SIZE);
+       strlcpy(client->name, "bt856", DEVICE_NAME_SIZE);
        encoder->client = client;
        i2c_set_clientdata(client, encoder);
        encoder->addr = client->addr;
        encoder->norm = VIDEO_MODE_NTSC;
        encoder->enable = 1;
 
-       DEBUG(printk(KERN_INFO "%s-bt856: attach\n", encoder->client->dev.name));
+       DEBUG(printk(KERN_INFO "%s-bt856: attach\n", encoder->client->name));
 
        i2c_smbus_write_byte_data(client, 0xdc, 0x18);
        encoder->reg[0xdc] = 0x18;
@@ -190,7 +190,7 @@ static int bt856_command(struct i2c_client *client, unsigned int cmd,
 
                        DEBUG(printk
                              (KERN_INFO "%s-bt856: get capabilities\n",
-                              encoder->client->dev.name));
+                              encoder->client->name));
 
                        cap->flags
                            = VIDEO_ENCODER_PAL
@@ -205,7 +205,7 @@ static int bt856_command(struct i2c_client *client, unsigned int cmd,
                        int *iarg = arg;
 
                        DEBUG(printk(KERN_INFO "%s-bt856: set norm %d\n",
-                                    encoder->client->dev.name, *iarg));
+                                    encoder->client->name, *iarg));
 
                        switch (*iarg) {
 
@@ -232,7 +232,7 @@ static int bt856_command(struct i2c_client *client, unsigned int cmd,
                        int *iarg = arg;
 
                        DEBUG(printk(KERN_INFO "%s-bt856: set input %d\n",
-                                    encoder->client->dev.name, *iarg));
+                                    encoder->client->name, *iarg));
 
                        /*     We only have video bus.
                           *iarg = 0: input is from bt819
@@ -268,7 +268,7 @@ static int bt856_command(struct i2c_client *client, unsigned int cmd,
                        int *iarg = arg;
 
                        DEBUG(printk(KERN_INFO "%s-bt856: set output %d\n",
-                                    encoder->client->dev.name, *iarg));
+                                    encoder->client->name, *iarg));
 
                        /* not much choice of outputs */
                        if (*iarg != 0) {
@@ -285,7 +285,7 @@ static int bt856_command(struct i2c_client *client, unsigned int cmd,
 
                        DEBUG(printk
                              (KERN_INFO "%s-bt856: enable output %d\n",
-                              encoder->client->dev.name, encoder->enable));
+                              encoder->client->name, encoder->enable));
                }
                break;
 
@@ -311,9 +311,7 @@ static struct i2c_driver i2c_driver_bt856 = {
 static struct i2c_client client_template = {
        .id = -1,
        .driver = &i2c_driver_bt856,
-       .dev = {
-               .name = "bt856_client",
-       },
+       .name = "bt856_client",
 };
 
 static int bt856_init(void)
index c61cd8a76a366799512dddaae915d5732ab5b990..7cbfb45bff2dd601b72af37395b0654743bcd089 100644 (file)
@@ -3469,7 +3469,7 @@ void __devinit bttv_check_chipset(void)
 
        /* print which chipset we have */
        while ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8,dev)))
-               printk(KERN_INFO "bttv: Host bridge is %s\n",dev->dev.name);
+               printk(KERN_INFO "bttv: Host bridge is %s\n",pci_name(dev));
 
        /* print warnings about any quirks found */
        if (triton1)
index 9c4887b0dbc4398f16db24ab34b088d4be49cee5..43b1e68537c2f3f14246169c080d854615e1aaf9 100644 (file)
@@ -1316,7 +1316,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
 #endif
        msp3400c_setvolume(c,msp->muted,msp->left,msp->right);
 
-       snprintf(c->dev.name, DEVICE_NAME_SIZE, "MSP34%02d%c-%c%d",
+       snprintf(c->name, DEVICE_NAME_SIZE, "MSP34%02d%c-%c%d",
                 (msp->rev2>>8)&0xff, (msp->rev1&0xff)+'@',
                 ((msp->rev1>>8)&0xff)+'@', msp->rev2&0x1f);
 
index ab533fc569cc9f425d9b8ae9abff7f6c947a7c28..ad4626bb68e9627bc3bfcaa68547641081f17d55 100644 (file)
@@ -171,7 +171,7 @@ static int saa5249_attach(struct i2c_adapter *adap, int addr, int kind)
                return -ENOMEM;
        }
        memset(t, 0, sizeof(*t));
-       strlcpy(client->dev.name, IF_NAME, DEVICE_NAME_SIZE);
+       strlcpy(client->name, IF_NAME, DEVICE_NAME_SIZE);
        init_MUTEX(&t->lock);
        
        /*
@@ -263,9 +263,7 @@ static struct i2c_driver i2c_driver_videotext =
 static struct i2c_client client_template = {
        .id             = -1,
        .driver         = &i2c_driver_videotext,
-       .dev            = {
-               .name   = "(unset)",
-       },
+       .name           = "(unset)",
 };
 
 /*
index d89084e17cc2bd2949ebd7e254d75fe5510b306d..c1cb663c6749306d12d650f4187aa367045a07f8 100644 (file)
@@ -147,7 +147,7 @@ int determine_norm(struct i2c_client* client)
 }
 
 static
-int saa7110_attach(struct i2c_adapter *adap, int  addr, unsigned short flags, int kind)
+int saa7110_attach(struct i2c_adapter *adap, int  addr, int kind)
 {
 static const unsigned char initseq[] = {
             0, 0x4C, 0x3C, 0x0D, 0xEF, 0xBD, 0xF0, 0x00, 0x00,
@@ -176,7 +176,7 @@ static      const unsigned char initseq[] = {
 
        /* clear our private data */
        memset(decoder, 0, sizeof(*decoder));
-       strlcpy(client->dev.name, IF_NAME, DEVICE_NAME_SIZE);
+       strlcpy(client->name, IF_NAME, DEVICE_NAME_SIZE);
        decoder->client = client;
        i2c_set_clientdata(client, decoder);
        decoder->addr = addr;
@@ -190,7 +190,7 @@ static      const unsigned char initseq[] = {
 
        rv = i2c_master_send(client, initseq, sizeof(initseq));
        if (rv < 0)
-               printk(KERN_ERR "%s_attach: init status %d\n", client->dev.name, rv);
+               printk(KERN_ERR "%s_attach: init status %d\n", client->name, rv);
        else {
                i2c_smbus_write_byte_data(client,0x21,0x16);
                i2c_smbus_write_byte_data(client,0x0D,0x04);
@@ -393,9 +393,7 @@ static struct i2c_driver i2c_driver_saa7110 =
 static struct i2c_client client_template = {
        .id             = -1,
        .driver         = &i2c_driver_saa7110,
-       .dev            = {
-               .name   = "saa7110_client",
-       },
+       .name           = "saa7110_client",
 };
 
 static int saa7110_init(void)
index 870313cc03e120e452903aa8bdbfc8b61c9b90b0..2868285b8a9048c8fb1a1a2c46fa9fa0f4830804 100644 (file)
@@ -122,7 +122,7 @@ static int saa7111_attach(struct i2c_adapter *adap, int addr, int kind)
        }
 
        memset(decoder, 0, sizeof(*decoder));
-       strlcpy(client->dev.name, "saa7111", DEVICE_NAME_SIZE);
+       strlcpy(client->name, "saa7111", DEVICE_NAME_SIZE);
        decoder->client = client;
        i2c_set_clientdata(client, decoder);
        decoder->addr = addr;
@@ -137,10 +137,10 @@ static int saa7111_attach(struct i2c_adapter *adap, int addr, int kind)
        i = i2c_master_send(client, init, sizeof(init));
        if (i < 0) {
                printk(KERN_ERR "%s_attach: init status %d\n",
-                      client->dev.name, i);
+                      client->name, i);
        } else {
                printk(KERN_INFO "%s_attach: chip version %x @ 0x%08x\n",
-                      client->dev.name, i2c_smbus_read_byte_data(client, 0x00) >> 4,addr);
+                      client->name, i2c_smbus_read_byte_data(client, 0x00) >> 4,addr);
        }
 
        init_MUTEX(&decoder->lock);
@@ -159,7 +159,7 @@ static int saa7111_probe(struct i2c_adapter *adap)
        }
        
        printk("saa7111: probing %s i2c adapter [id=0x%x]\n",
-                       adap->dev.name,adap->id);
+                       adap->name,adap->id);
        return i2c_probe(adap, &addr_data, saa7111_attach);
 }
 
@@ -188,8 +188,7 @@ static int saa7111_command(struct i2c_client *client, unsigned int cmd,
                        for (i = 0; i < 32; i += 16) {
                                int j;
 
-                               printk("KERN_DEBUG %s: %03x", client->dev.name,
-                                      i);
+                               printk("KERN_DEBUG %s: %03x", client->name, i);
                                for (j = 0; j < 16; ++j) {
                                        printk(" %02x",
                                               i2c_smbus_read_byte_data(client,
@@ -413,9 +412,7 @@ static struct i2c_driver i2c_driver_saa7111 = {
 static struct i2c_client client_template = {
        .id     = -1,
        .driver = &i2c_driver_saa7111,
-       .dev    = {
-               .name   = "saa7111_client",
-       },
+       .name   = "saa7111_client",
 };
 
 static int saa7111_init(void)
index f49b49f5d0a1dc6abba45e7c8103524b9ced47a3..c15ef076a41b8bd338082abe1624c80ce703270d 100644 (file)
@@ -399,7 +399,7 @@ void saa7134_i2c_call_clients(struct saa7134_dev *dev,
 int saa7134_i2c_register(struct saa7134_dev *dev)
 {
        dev->i2c_adap = saa7134_adap_template;
-       strcpy(dev->i2c_adap.dev.name,dev->name);
+       strcpy(dev->i2c_adap.name,dev->name);
        dev->i2c_adap.algo_data = dev;
        i2c_add_adapter(&dev->i2c_adap);
        
index 8734ed58bc423a357de9b379a9c9765856c8aeaf..e99c87b26cbbd8f09a2e9ba70554c49287a20f78 100644 (file)
@@ -181,7 +181,7 @@ static const unsigned char init_ntsc[] = {
        0x66, 0x21,             /* FSC3 */
 };
 
-static int saa7185_attach(struct i2c_adapter *adap, int addr, unsigned short flags, int kind)
+static int saa7185_attach(struct i2c_adapter *adap, int addr, int kind)
 {
        int i;
        struct saa7185 *encoder;
@@ -202,7 +202,7 @@ static int saa7185_attach(struct i2c_adapter *adap, int addr, unsigned short fla
 
 
        memset(encoder, 0, sizeof(*encoder));
-       strlcpy(client->dev.name, "saa7185", DEVICE_NAME_SIZE);
+       strlcpy(client->name, "saa7185", DEVICE_NAME_SIZE);
        encoder->client = client;
        i2c_set_clientdata(client, encoder);
        encoder->addr = addr;
@@ -215,11 +215,10 @@ static int saa7185_attach(struct i2c_adapter *adap, int addr, unsigned short fla
                                        sizeof(init_ntsc));
        }
        if (i < 0) {
-               printk(KERN_ERR "%s_attach: init error %d\n", client->dev.name,
-                      i);
+               printk(KERN_ERR "%s_attach: init error %d\n", client->name, i);
        } else {
                printk(KERN_INFO "%s_attach: chip version %d\n",
-                      client->dev.name, i2c_smbus_read_byte(client) >> 5);
+                      client->name, i2c_smbus_read_byte(client) >> 5);
        }
        init_MUTEX(&encoder->lock);
        i2c_attach_client(client);
@@ -367,9 +366,7 @@ static struct i2c_driver i2c_driver_saa7185 = {
 static struct i2c_client client_template = {
        .id     = -1,
        .driver = &i2c_driver_saa7185,
-       .dev    = {
-               .name   = "saa7185_client",
-       },
+       .name   = "saa7185_client",
 };
 
 static int saa7185_init(void)
index 275fe5f1d849dc05bf7b5c973d8c6907820bd6e6..873f96bf605f63937d6fad363d1ff93a94ad324c 100644 (file)
@@ -198,7 +198,7 @@ static int tda9840_detect(struct i2c_adapter *adapter, int address, int kind)
        }
        
        /* fill client structure */
-       sprintf(client->dev.name,"tda9840 (0x%02x)", address);
+       sprintf(client->name,"tda9840 (0x%02x)", address);
        client->id = tda9840_id++;
        client->flags = 0;
        client->addr = address;
@@ -227,7 +227,7 @@ static int tda9840_detect(struct i2c_adapter *adapter, int address, int kind)
                printk("tda9840.o: could not initialize ic #3. continuing anyway. (result:%d)\n",result);
        } 
        
-       printk("tda9840.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->dev.name[0]);
+       printk("tda9840.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->name[0]);
 
        return 0;
 }
@@ -236,7 +236,7 @@ static int tda9840_attach(struct i2c_adapter *adapter)
 {
        /* let's see whether this is a know adapter we can attach to */
        if( adapter->id != I2C_ALGO_SAA7146 ) {
-               dprintk("tda9840.o: refusing to probe on unknown adapter [name='%s',id=0x%x]\n",adapter->dev.name,adapter->id);
+               dprintk("tda9840.o: refusing to probe on unknown adapter [name='%s',id=0x%x]\n",adapter->name,adapter->id);
                return -ENODEV;
        }
 
index 080cfba95fb332439c9567e59763548117758891..2fcf6c685bbaebd0c792dc4406862190ceec4df3 100644 (file)
@@ -441,9 +441,7 @@ static struct i2c_client client_template =
 {
        .flags  = I2C_CLIENT_ALLOW_USE,
         .driver = &driver,
-        .dev   = {
-               .name   = "tda9887",
-       },
+       .name   = "tda9887",
 };
 
 static int tda9887_init_module(void)
index 9fa7c34b54b09350bd0edcedcccad614170b3229..6ee48f15602fc2f03fd10e4a64311ac129e2a892 100644 (file)
@@ -72,7 +72,7 @@ static int tea6415c_detect(struct i2c_adapter *adapter, int address, int kind)
        }
 
        /* fill client structure */
-       sprintf(client->dev.name,"tea6415c (0x%02x)", address);
+       sprintf(client->name,"tea6415c (0x%02x)", address);
        client->id = tea6415c_id++;
        client->flags = 0;
        client->addr = address;
@@ -85,7 +85,7 @@ static int tea6415c_detect(struct i2c_adapter *adapter, int address, int kind)
                return err;
        }
 
-       printk("tea6415c.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->dev.name[0]);
+       printk("tea6415c.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->name[0]);
 
        return 0;
 }
@@ -94,7 +94,7 @@ static int tea6415c_attach(struct i2c_adapter *adapter)
 {
        /* let's see whether this is a know adapter we can attach to */
        if( adapter->id != I2C_ALGO_SAA7146 ) {
-               dprintk("tea6415c.o: refusing to probe on unknown adapter [name='%s',id=0x%x]\n",adapter->dev.name,adapter->id);
+               dprintk("tea6415c.o: refusing to probe on unknown adapter [name='%s',id=0x%x]\n",adapter->name,adapter->id);
                return -ENODEV;
        }
 
index 74ea97c1f2d90704843d5d6f9965753025c6cedb..206c7ec73af01dde8966d8c9c04731bafe7d0897 100644 (file)
@@ -112,7 +112,7 @@ static int tea6420_detect(struct i2c_adapter *adapter, int address, int kind)
        }
        
        /* fill client structure */
-       sprintf(client->dev.name,"tea6420 (0x%02x)", address);
+       sprintf(client->name,"tea6420 (0x%02x)", address);
        client->id = tea6420_id++;
        client->flags = 0;
        client->addr = address;
@@ -135,7 +135,7 @@ static int tea6420_detect(struct i2c_adapter *adapter, int address, int kind)
                printk("tea6420.o: could not initialize chipset. continuing anyway.\n");
        }
        
-       printk("tea6420.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->dev.name[0]);
+       printk("tea6420.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->name[0]);
 
        return 0;
 }
@@ -144,7 +144,7 @@ static int tea6420_attach(struct i2c_adapter *adapter)
 {
        /* let's see whether this is a know adapter we can attach to */
        if( adapter->id != I2C_ALGO_SAA7146 ) {
-               dprintk("tea6420.o: refusing to probe on unknown adapter [name='%s',id=0x%x]\n",adapter->dev.name,adapter->id);
+               dprintk("tea6420.o: refusing to probe on unknown adapter [name='%s',id=0x%x]\n",adapter->name,adapter->id);
                return -ENODEV;
        }
 
index 61513bb0fae9b439f6122f5688605868c51d092d..3e06dc8ef8c3d4d6a8a7f1f839b5d638d1dc3abd 100644 (file)
@@ -197,9 +197,7 @@ static struct i2c_client client_template =
 {
         .id            = -1,
         .driver                = &i2c_driver_tuner,
-        .dev           = {
-               .name   = "SAB3036",
-       },
+       .name           = "SAB3036",
 };
 
 int __init
index b7d84695612f4da60ef4762284cb3cdb304ca311..b1760ae9b6b142d5444d28546f11871483e76921 100644 (file)
@@ -824,7 +824,7 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
        if (type < TUNERS) {
                t->type = type;
                printk("tuner(bttv): type forced to %d (%s) [insmod]\n",t->type,tuners[t->type].name);
-               strlcpy(client->dev.name, tuners[t->type].name, DEVICE_NAME_SIZE);
+               strlcpy(client->name, tuners[t->type].name, DEVICE_NAME_SIZE);
        }
         i2c_attach_client(client);
         if (t->type == TUNER_MT2032)
@@ -875,7 +875,7 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
                t->type = *iarg;
                printk("tuner: type set to %d (%s)\n",
                         t->type,tuners[t->type].name);
-               strlcpy(client->dev.name, tuners[t->type].name, DEVICE_NAME_SIZE);
+               strlcpy(client->name, tuners[t->type].name, DEVICE_NAME_SIZE);
                if (t->type == TUNER_MT2032)
                         mt2032_init(client);
                break;
@@ -962,9 +962,7 @@ static struct i2c_client client_template =
 {
        .flags  = I2C_CLIENT_ALLOW_USE,
        .driver = &driver,
-       .dev  = {
-               .name   = "(tuner unset)",
-       },
+       .name   = "(tuner unset)",
 };
 
 static int tuner_init_module(void)
index 43a277eabcd9bcbbb60f2d48770d8feed2a4424e..b8b3c6a1d601065d446e5f35bd445170e235fb22 100644 (file)
@@ -166,6 +166,7 @@ struct i2c_client {
                                        /* to the client                */
        struct device dev;              /* the device structure         */
        struct list_head list;
+       char name[DEVICE_NAME_SIZE];
 };
 #define to_i2c_client(d) container_of(d, struct i2c_client, dev)
 
@@ -179,11 +180,11 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data)
        dev_set_drvdata (&dev->dev, data);
 }
 
-#define I2C_DEVNAME(str)   .dev = { .name = str }
+#define I2C_DEVNAME(str)       .name = str
 
 static inline char *i2c_clientname(struct i2c_client *c)
 {
-       return c->dev.name;
+       return &c->name[0];
 }
 
 /*
@@ -251,6 +252,7 @@ struct i2c_adapter {
        int nr;
        struct list_head clients;
        struct list_head list;
+       char name[DEVICE_NAME_SIZE];
 };
 #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)