~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to arch/sh/boards/mach-ap325rxa/setup.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
359
359
        .priv           = &camera_info,
360
360
};
361
361
 
362
 
static void dummy_release(struct device *dev)
 
362
static struct platform_device *camera_device;
 
363
 
 
364
static void ap325rxa_camera_release(struct device *dev)
363
365
{
 
366
        soc_camera_platform_release(&camera_device);
364
367
}
365
368
 
366
 
static struct platform_device camera_device = {
367
 
        .name           = "soc_camera_platform",
368
 
        .dev            = {
369
 
                .platform_data  = &camera_info,
370
 
                .release        = dummy_release,
371
 
        },
372
 
};
373
 
 
374
369
static int ap325rxa_camera_add(struct soc_camera_link *icl,
375
370
                               struct device *dev)
376
371
{
377
 
        if (icl != &camera_link || camera_probe() <= 0)
378
 
                return -ENODEV;
379
 
 
380
 
        camera_info.dev = dev;
381
 
 
382
 
        return platform_device_register(&camera_device);
 
372
        int ret = soc_camera_platform_add(icl, dev, &camera_device, &camera_link,
 
373
                                          ap325rxa_camera_release, 0);
 
374
        if (ret < 0)
 
375
                return ret;
 
376
 
 
377
        ret = camera_probe();
 
378
        if (ret < 0)
 
379
                soc_camera_platform_del(icl, camera_device, &camera_link);
 
380
 
 
381
        return ret;
383
382
}
384
383
 
385
384
static void ap325rxa_camera_del(struct soc_camera_link *icl)
386
385
{
387
 
        if (icl != &camera_link)
388
 
                return;
389
 
 
390
 
        platform_device_unregister(&camera_device);
391
 
        memset(&camera_device.dev.kobj, 0,
392
 
               sizeof(camera_device.dev.kobj));
 
386
        soc_camera_platform_del(icl, camera_device, &camera_link);
393
387
}
394
388
#endif /* CONFIG_I2C */
395
389