~ubuntu-branches/ubuntu/trusty/linux-linaro-omap/trusty

« back to all changes in this revision

Viewing changes to drivers/i2c/busses/i2c-cpm.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-57i0gl3v99b3lkfg
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:
662
662
        /* register new adapter to i2c module... */
663
663
 
664
664
        data = of_get_property(ofdev->dev.of_node, "linux,i2c-index", &len);
665
 
        if (data && len == 4) {
666
 
                cpm->adap.nr = *data;
667
 
                result = i2c_add_numbered_adapter(&cpm->adap);
668
 
        } else
669
 
                result = i2c_add_adapter(&cpm->adap);
 
665
        cpm->adap.nr = (data && len == 4) ? be32_to_cpup(data) : -1;
 
666
        result = i2c_add_numbered_adapter(&cpm->adap);
670
667
 
671
668
        if (result < 0) {
672
669
                dev_err(&ofdev->dev, "Unable to register with I2C\n");