X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fdmasound%2Fdac3550a.c;h=7360d8954d6009009f57e7b18b8f437fb15f9c52;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=82bc6bfaf2537044c791c953a797940251a91e48;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/sound/oss/dmasound/dac3550a.c b/sound/oss/dmasound/dac3550a.c index 82bc6bfaf..7360d8954 100644 --- a/sound/oss/dmasound/dac3550a.c +++ b/sound/oss/dmasound/dac3550a.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -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;