Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / sound / oss / dmasound / dac3550a.c
index 82bc6bf..7360d89 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <linux/module.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 #include <linux/proc_fs.h>
 #include <linux/ioport.h>
 #include <linux/sysctl.h>
@@ -39,14 +40,11 @@ static int daca_attach_adapter(struct i2c_adapter *adapter);
 static int daca_detect_client(struct i2c_adapter *adapter, int address);
 static int daca_detach_client(struct i2c_client *client);
 
-/* Unique ID allocation */
-static int daca_id;
-
 struct i2c_driver daca_driver = {  
-       .owner                  = THIS_MODULE,
-       .name                   = "DAC3550A driver  V " DACA_VERSION,
+       .driver = {
+               .name           = "DAC3550A driver  V " DACA_VERSION,
+       },
        .id                     = I2C_DRIVERID_DACA,
-       .flags                  = I2C_DF_NOTIFY,
        .attach_adapter         = daca_attach_adapter,
        .detach_client          = daca_detach_client,
 };
@@ -97,14 +95,14 @@ int daca_leave_sleep(void)
        /* Do a short sleep, just to make sure I2C bus is awake and paying
         * attention to us
         */
-       wait_ms(20);
+       msleep(20);
        /* Write the sample rate reg the value it needs */
        i2c_smbus_write_byte_data(daca_client, 1, 8);
        daca_set_volume(cur_left_vol >> 5, cur_right_vol >> 5);
        /* Another short delay, just to make sure the other I2C bus writes
         * have taken...
         */
-       wait_ms(20);
+       msleep(20);
        /* Write the global config reg - invert right power amp,
         * DAC on, use 5-volt mode */
        i2c_smbus_write_byte_data(daca_client, 3, 0x45);
@@ -175,7 +173,6 @@ static int daca_detect_client(struct i2c_adapter *adapter, int address)
        new_client->driver = &daca_driver;
        new_client->flags = 0;
        strcpy(new_client->name, client_name);
-       new_client->id = daca_id++; /* racy... */
 
        if (daca_init_client(new_client))
                goto bail;