~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/char/hw_random/amd-rng.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
        pmbase &= 0x0000FF00;
134
134
        if (pmbase == 0)
135
135
                goto out;
 
136
        if (!request_region(pmbase + 0xF0, 8, "AMD HWRNG")) {
 
137
                dev_err(&pdev->dev, "AMD HWRNG region 0x%x already in use!\n",
 
138
                        pmbase + 0xF0);
 
139
                err = -EBUSY;
 
140
                goto out;
 
141
        }
136
142
        amd_rng.priv = (unsigned long)pmbase;
137
143
        amd_pdev = pdev;
138
144
 
141
147
        if (err) {
142
148
                printk(KERN_ERR PFX "RNG registering failed (%d)\n",
143
149
                       err);
 
150
                release_region(pmbase + 0xF0, 8);
144
151
                goto out;
145
152
        }
146
153
out:
149
156
 
150
157
static void __exit mod_exit(void)
151
158
{
 
159
        u32 pmbase = (unsigned long)amd_rng.priv;
 
160
        release_region(pmbase + 0xF0, 8);
152
161
        hwrng_unregister(&amd_rng);
153
162
}
154
163