devices/ccat/update.c
branchstable-1.5
changeset 2573 ad9a35065387
parent 2571 a4fdad543554
child 2636 0613017547fe
equal deleted inserted replaced
2572:0bc1ec2711b1 2573:ad9a35065387
   411 	kref_init(&update->refcount);
   411 	kref_init(&update->refcount);
   412 	update->ioaddr = ccatdev->bar[0].ioaddr + ioread32(addr + 0x8);
   412 	update->ioaddr = ccatdev->bar[0].ioaddr + ioread32(addr + 0x8);
   413 	memcpy_fromio(&update->info, addr, sizeof(update->info));
   413 	memcpy_fromio(&update->info, addr, sizeof(update->info));
   414 
   414 
   415 	if (0x00 != update->info.rev) {
   415 	if (0x00 != update->info.rev) {
   416 		pr_warn("CCAT Update rev. %d not supported\n", update->info.rev);
   416 		pr_warn("CCAT Update rev. %d not supported\n",
       
   417 			update->info.rev);
   417 		goto cleanup;
   418 		goto cleanup;
   418 	}
   419 	}
   419 
   420 
   420 	if (alloc_chrdev_region(&update->dev, 0, 1, KBUILD_MODNAME)) {
   421 	if (alloc_chrdev_region(&update->dev, 0, 1, KBUILD_MODNAME)) {
   421 		pr_warn("alloc_chrdev_region() failed\n");
   422 		pr_warn("alloc_chrdev_region() failed\n");