]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/cpufreq/s3c24xx-cpufreq.c
cpufreq: Use sizeof(*ptr) convetion for computing sizes
[mirror_ubuntu-artful-kernel.git] / drivers / cpufreq / s3c24xx-cpufreq.c
index 87781eb20d6dce41c4b6c376f4937f67d808d0be..f169ee52e6ebf734d73e1bea4d956e829a18f7a3 100644 (file)
@@ -522,7 +522,7 @@ int __init s3c_cpufreq_setboard(struct s3c_cpufreq_board *board)
        /* Copy the board information so that each board can make this
         * initdata. */
 
-       ours = kzalloc(sizeof(struct s3c_cpufreq_board), GFP_KERNEL);
+       ours = kzalloc(sizeof(*ours), GFP_KERNEL);
        if (ours == NULL) {
                printk(KERN_ERR "%s: no memory\n", __func__);
                return -ENOMEM;
@@ -615,7 +615,7 @@ static int s3c_cpufreq_build_freq(void)
        size = cpu_cur.info->calc_freqtable(&cpu_cur, NULL, 0);
        size++;
 
-       ftab = kmalloc(sizeof(struct cpufreq_frequency_table) * size, GFP_KERNEL);
+       ftab = kmalloc(sizeof(*ftab) * size, GFP_KERNEL);
        if (!ftab) {
                printk(KERN_ERR "%s: no memory for tables\n", __func__);
                return -ENOMEM;
@@ -691,7 +691,7 @@ int __init s3c_plltab_register(struct cpufreq_frequency_table *plls,
        struct cpufreq_frequency_table *vals;
        unsigned int size;
 
-       size = sizeof(struct cpufreq_frequency_table) * (plls_no + 1);
+       size = sizeof(*vals) * (plls_no + 1);
 
        vals = kmalloc(size, GFP_KERNEL);
        if (vals) {