saa7706h.c (818b930bc15077fc00ff16bb22c5df1857f05afa) saa7706h.c (4c62e9764ab403d42f9b8871b1241fe7812f19d4)
1/*
2 * saa7706.c Philips SAA7706H Car Radio DSP driver
3 * Copyright (c) 2009 Intel Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *

--- 359 unchanged lines hidden (view full) ---

368 .core = &saa7706h_core_ops,
369};
370
371/*
372 * Generic i2c probe
373 * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
374 */
375
1/*
2 * saa7706.c Philips SAA7706H Car Radio DSP driver
3 * Copyright (c) 2009 Intel Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *

--- 359 unchanged lines hidden (view full) ---

368 .core = &saa7706h_core_ops,
369};
370
371/*
372 * Generic i2c probe
373 * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
374 */
375
376static int __devinit saa7706h_probe(struct i2c_client *client,
377 const struct i2c_device_id *id)
376static int saa7706h_probe(struct i2c_client *client,
377 const struct i2c_device_id *id)
378{
379 struct saa7706h_state *state;
380 struct v4l2_subdev *sd;
381 int err;
382
383 /* Check if the adapter supports the needed features */
384 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
385 return -EIO;

--- 27 unchanged lines hidden (view full) ---

413 v4l2_device_unregister_subdev(sd);
414 kfree(to_state(sd));
415
416 printk(KERN_ERR DRIVER_NAME ": Failed to probe: %d\n", err);
417
418 return err;
419}
420
378{
379 struct saa7706h_state *state;
380 struct v4l2_subdev *sd;
381 int err;
382
383 /* Check if the adapter supports the needed features */
384 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
385 return -EIO;

--- 27 unchanged lines hidden (view full) ---

413 v4l2_device_unregister_subdev(sd);
414 kfree(to_state(sd));
415
416 printk(KERN_ERR DRIVER_NAME ": Failed to probe: %d\n", err);
417
418 return err;
419}
420
421static int __devexit saa7706h_remove(struct i2c_client *client)
421static int saa7706h_remove(struct i2c_client *client)
422{
423 struct v4l2_subdev *sd = i2c_get_clientdata(client);
424
425 saa7706h_mute(sd);
426 v4l2_device_unregister_subdev(sd);
427 kfree(to_state(sd));
428 return 0;
429}

--- 6 unchanged lines hidden (view full) ---

436MODULE_DEVICE_TABLE(i2c, saa7706h_id);
437
438static struct i2c_driver saa7706h_driver = {
439 .driver = {
440 .owner = THIS_MODULE,
441 .name = DRIVER_NAME,
442 },
443 .probe = saa7706h_probe,
422{
423 struct v4l2_subdev *sd = i2c_get_clientdata(client);
424
425 saa7706h_mute(sd);
426 v4l2_device_unregister_subdev(sd);
427 kfree(to_state(sd));
428 return 0;
429}

--- 6 unchanged lines hidden (view full) ---

436MODULE_DEVICE_TABLE(i2c, saa7706h_id);
437
438static struct i2c_driver saa7706h_driver = {
439 .driver = {
440 .owner = THIS_MODULE,
441 .name = DRIVER_NAME,
442 },
443 .probe = saa7706h_probe,
444 .remove = __devexit_p(saa7706h_remove),
444 .remove = saa7706h_remove,
445 .id_table = saa7706h_id,
446};
447
448module_i2c_driver(saa7706h_driver);
449
450MODULE_DESCRIPTION("SAA7706H Car Radio DSP driver");
451MODULE_AUTHOR("Mocean Laboratories");
452MODULE_LICENSE("GPL v2");
445 .id_table = saa7706h_id,
446};
447
448module_i2c_driver(saa7706h_driver);
449
450MODULE_DESCRIPTION("SAA7706H Car Radio DSP driver");
451MODULE_AUTHOR("Mocean Laboratories");
452MODULE_LICENSE("GPL v2");